View Single Post
  #1  
Old 12-02-2003, 07:36 PM
Eglin
Hill Giant
 
Join Date: Nov 2003
Posts: 168
Default Re: Timestamps on the output on the world and zone servers

Quote:
Originally Posted by Jhonas
I haven't had the server use the files in the logs/ directory (It says it failed to open them, probably wants me to make them), so I'm not sure if this already exists in the logs, but I've been running things like:

./world >> world.log &
./zone . ip port ip >> zone1.log &
./zone . ip port ip >> zone2.log &

and so on. It would be nice if it would timestamp the output so I could align error output in the logs to player documentation of bugs.
eqemu has a fairly robust logger that will eventually probably have options to use your existing syslogds, but for now this is probably the easiest way:

(./World 2>&1) | awk -v tz=$(`which date` +%z) '{print "["strftime("%m-%d-%Y %H:%M:%S") tz"] "$0}' | tee -a logfile.log

be sure that you know what timezone your players are in if you intend to do much detective work.
Reply With Quote