This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Changing log()


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]