vsop_479
(Zhou)
March 28, 2023, 7:52am
1
Is there any way to set other time zone in rally's log?
I tried modify the format or datefmt in logging.json, but can't figure it out.
"normal": {
"format": "%(asctime)s,%(msecs)d %(actorAddress)s/PID:%(process)d %(name)s %(levelname)s %(message)s",
"datefmt": "%Y-%m-%d %H:%M:%S",
"()": "esrally.log.configure_utc_formatter"
}
dliappis
(Dimitrios Liappis)
March 28, 2023, 10:01am
2
Hello,
As you've shown in the above snippet, the actual function that is currently used forces the output to UTC.
Depending on what you need to do and depending on how you've installed Rally, one workaround would be to edit the file rally/log.py at 71688bcf5175cd1330481e8021f51d9c525785e1 · elastic/rally · GitHub and e.g. switch from time.gmtime
to time.local
to honor the local timezone defined on your host.
We could probably support an additional property to specify a timezone for logging; I'll create a Rally issue.
dliappis
(Dimitrios Liappis)
March 28, 2023, 10:07am
3
vsop_479
(Zhou)
March 28, 2023, 11:38am
4
Nice, thanks for your work.
@vsop_479 Can you please share why using local time would help? Sticking to UTC avoids a lot of complexity . So it would be interesting to know about your use case.
vsop_479
(Zhou)
April 20, 2023, 11:57am
6
The time in rally.log is different to host time, which just makes reading log inconvenient.
It seems complex to support configuable timezone in rally.
vsop_479
(Zhou)
April 20, 2023, 11:58am
7
The time in rally.log is different to host time, which just makes reading log inconvenient.
It seems complex to support configuable timezone in rally.
system
(system)
Closed
May 18, 2023, 11:58am
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
This is now part of Rally 2.8.0. Thanks!
1 Like