Conversation
etc/kytos/logging.ini
Outdated
[handler_syslog] | ||
class: handlers.SysLogHandler | ||
args: [('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER] | ||
args: ['/dev/log'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@macartur this should be /var/log
doesn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the device used to write in local syslog. I will try to change this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using that http://scottbarnham.com/blog/2008/01/01/sysloghandler-not-writing-to-syslog-with-python-logging/, I can use syslog using logging.ini yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that I have /dev/log :). I did a quick read in the link above and also in Python's docs and I thinks it's ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
kytos/core/logs.py
Outdated
cls._add_handler(handler) | ||
return handler | ||
|
||
@staticmethod | ||
def _add_handler(handler): | ||
handler.setFormatter(logging.Formatter(FORMAT)) | ||
logging.getLogger().addHandler(handler) | ||
handler.setFormatter(Formatter(FORMAT)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you retrieve the format from one of those defined on the logging.ini
file?
@macartur also do not forget to mention which issue you are dealing with on you commit(s) message(s) =) |
1a56a7a
to
681910c
Compare
Set logging configuration using etc/kytos/logging.ini Fixed syslog Fix kytos#315
Set logging configuration using etc/kytos/logging.ini
Fixed syslog