How to set other time zone in rally's log?

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"
    }

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.

raised Configurable timezone for Rally logging · Issue #1694 · elastic/rally · GitHub

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.

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.

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.

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