Topic: Log file: time format
greetings guys,
im currently developing a new stats tool (i dont like the available ones) and am wondering what format the time has or if i can change that format to some other format.
thx in advance
//bocki
You are not logged in. Please login or register.
Teeworlds Forum → Development → Log file: time format
greetings guys,
im currently developing a new stats tool (i dont like the available ones) and am wondering what format the time has or if i can change that format to some other format.
thx in advance
//bocki
It is a hexadecimal representation of a unix timestamp.
Should be quite trivial to convert.
(In PHP its something as simple as <?php echo date('r', hexdec('48f3cfc8'));?>)
Easy to parse and/or compact I presume, but it would increase user friendliness with a (normal) human readable format imho.
Easy to parse and/or compact I presume, but it would increase user friendliness with a (normal) human readable format imho.
Yes, but frankly, do you sit staring at the logs yourself? I know I don't, and the best reason for them to be there as I see it is for scripts, and for that the format is great.
Well, I do not fill my days staring at teeworlds logs, no. But I do write programs myself and I cannot see why a log should not be easily human readable. They can still be parsed. I mean, the logs are there for viewing in the first place and can for sure be of help while debugging and/or understanding. Even for non-developers.
But as I stated first, that's my personal opinion and I can live with the current format. If I one day get heavily dependent upon knowing what time certain log messages in teeworlds are printed, I'd write a tool myself if someone hasn't.
In my opinion keeping the logs as raw as possible saves CPU time, because the game dont have to compute that much stuff.
In my opinion keeping the logs as raw as possible saves CPU time, because the game dont have to compute that much stuff.
You do realize that formatting a timestamp is insignificant with respect to CPU time(?)
No i dont. ( Explain if u wish, im all ears ... ) Also I was speaking about logging in general, not only about timestamps.
No i dont. ( Explain if u wish, im all ears ... ) Also I was speaking about logging in general, not only about timestamps.
To put it simply, formatting log output whether it's the timestamps or more formatting is less cpu-intensive than about everything else TeeWorlds does. It already formats them and Bocki is asking for an alternative formatting; I personally don't really care but CPU time is really not an argument. This is only an aesthetical matter. The best thing would be to be able to configure the log output by having each admin defining the format they like, but even if this is not difficult to do that's hardly high on TW's priority list right now.
Teeworlds Forum → Development → Log file: time format
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.