Closed advornic closed 9 years ago
Release note:
All server-side logs now contain a timestamp. Use 'ztps --debug' for verbose debug output.
I don't see timestamped logs using --debug. Am I missing something?
DEBUG: [controller:648] 100000000588: processing action configure xmpp (variable substitution)
DEBUG: [controller:648] 100000000588: processing action configure MLAG, VARP, BGP (variable substitution)
DEBUG: [controller:648] 100000000588: processing action configure bgp interface automation event-handler (variable substitution)
DEBUG: [controller:648] 100000000588: processing action automate BGP peer interface config (variable substitution)
Does it need to be manually configured, like:
[default]
console_logging_format = %(levelname)s: %(asctime)s [%(module)s:%(lineno)d] %(message)s
Did you update "console_logging_format"?
The release note is a bit inaccurate.
Looks like:
[default] console_logging_format
is missing from ztpserver.conf
For kicks I changed:
cp = ConfigParser.ConfigParser()
to:
cp = ConfigParser.RawConfigParser()
and that fixed it. I don't think we're really using configparser interpolation for anything. Maybe we can be selective as to when we use raw reading. (https://github.com/arista-eosplus/ztpserver/blob/develop/ztpserver/config.py#L261)
Fixed in 089e3ea
Server log message format is now configurable via ztpserver.conf. The default value is shown below and is configured in the [default] section.
Valid values should use the Python logging format as found here and here