Is it possible to timestamp events in bzadmin? I'm using this to log activity on the server, but without times, it's not really all that useful.
Thanks.
Time Stamping Events
-
- Private First Class
- Posts: 99
- Joined: Fri Jan 21, 2005 4:23 am
- Location: Gone
Assuming linux:
will put a 10 minute timestamp in the log.
Code: Select all
while true;do OUT1=$(date +%d-%m-%y@%X);bzadmin time@teppic.homelinux.net:5154 $OUT1 /quit;sleep 600;done
perl
Code: Select all
bzadmin user@server:port | perl -pne '($s,$m,$h,$D,$M,$Y,,,,) = localtime(); printf "%4d-%02d-%02d %02d:%02d:%02d ", $Y+1900,$M+1,$D,$h,$m,$s';
I don't need huge pictures here.
- Pimpinella
- Private First Class
- Posts: 96
- Joined: Wed Nov 19, 2003 4:50 pm
- Location: Jever, NDS, Germany
Re: perl
you might have to call bzadmin like "bzadmin -ui stdout user@server:port" thoughmeacan wrote:Or perhaps use logger to feed it to syslogCode: Select all
bzadmin user@server:port | perl -pne '($s,$m,$h,$D,$M,$Y,,,,) = localtime(); printf "%4d-%02d-%02d %02d:%02d:%02d ", $Y+1900,$M+1,$D,$h,$m,$s';