This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Changing log()
- From: Martin Hunt <hunt at redhat dot com>
- To: systemtap at sources dot redhat dot com
- Date: Wed, 12 Apr 2006 11:24:04 -0700
- Subject: Changing log()
- Organization: Red Hat Inc.
log() currently does a subset of what print() and printf() do. It is not
useful and should be either deprecated and removed or redefined.
This would require old scripts that still use it to be updated to use
print() or printf().
I would like to redefine it to write a message to stderr, instead of
stdout.
Why is the new log necessary? Because stdout is often redirected to a
file (or in the case of relayfs, sent directly there) and important
messages aren't seen. Of course, warn() could be used, but sometimes the
message is really informational. For example, you might want to
periodically print out the number of probes triggered so far. Or the
status of a buffer that is filling up. Or prompt the user to select an
option.
Opinions?
If I hear no objections, I will commit the changes next week.
Martin