On Friday 12 October 2007 11:43, Mariusz Czulada wrote: > Hi, > > Dnia 11-10-2007 o godz. 18:13 Kern Sibbald napisaĆ(a): > > Hello, > > > > On Thursday 11 October 2007 17:05, Mariusz Czulada wrote: > > > Hello, > > > > > > I wanted a timestamp to be printed in SD output, for correlating SD > > > events with other system activities. I made some changes in three files > > > and 'svn diff'-ed them as a patch (in attachment). > > > > > > src/stored/stored.h: > > > - added 'dbg_timestamp' extern variable for indication if time needed > > > in output. > > > > > > src/stored/stored.c: > > > - changed usage text - added '-dt' option to switch timestamps on > > > - changed usage text - changed '-dnn' to '-d <nn>'. <nn> is not treated > > > literally, but substituted, like <file> or <group>, I think. > > > - added procesing of 't' parameter when '-d' option is used. > > > > > > src/lib/message.c: > > > - added 'dbg_timestamp' as a global variable. > > > - added code in 'd_msg' function to print date and time, when debugging > > > is on and 'dbg_timestamp' variable is set to 'true'. > > > > > > Hope it could be useful for others :-) > > > > Yes, the patch looks like it is useful to users wanting a timestamp > > (something > > Eric has requested). The only thing that I see that may not work > > correctly > > is your implementation of -dt. It seems to me that if someone enters > > a -d116, it is going to turn on the timestamp debugging rather than > > setting > > the level to 116. I'm not an expert in command line arguments, but would > > need to resolve this question before applying the patch. > > If -d parameter is not (or does not starts with) 't', everything is > processed as previously, in 'else' block, where debug level is ser. > Timestamping is turned on only when -dt is passed, and the order of -d > options is not important. > > BTW. I see that most of the tools use -d<nn> option, so I'll add the > code to other programs, so -dt option will work in all binaries (already > supporting -d<nn>). Then will resend a new complete patch. OK?
Yes. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
