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. Best regards, Kern > > Regards, > > Mariusz Czulada > > ---------------------------------------------------- > Walka o Mistrzostwo Świata! Krzysztof DIABLO Włodarczyk > 20.10 po raz kolejny stanie ringu! Musisz to zobaczy! > Kliknij: > http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Folympic.html&sid >=57 ------------------------------------------------------------------------- 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
