Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Improving logs #377

Merged
merged 1 commit into from May 3, 2017
Merged

Improving logs #377

merged 1 commit into from May 3, 2017

Conversation

macartur
Copy link
Contributor

Set logging configuration using etc/kytos/logging.ini
Fixed syslog

@macartur macartur requested review from cemsbr and diraol April 26, 2017 15:25
[handler_syslog]
class: handlers.SysLogHandler
args: [('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER]
args: ['/dev/log']
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed!

cls._add_handler(handler)
return handler

@staticmethod
def _add_handler(handler):
handler.setFormatter(logging.Formatter(FORMAT))
logging.getLogger().addHandler(handler)
handler.setFormatter(Formatter(FORMAT))
Copy link
Contributor

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?

@diraol
Copy link
Contributor

diraol commented May 2, 2017

@macartur also do not forget to mention which issue you are dealing with on you commit(s) message(s) =)

@beraldoleal
Copy link
Member

@macartur waiting for reply on @diraol comment.

@macartur macartur force-pushed the issue-#315 branch 3 times, most recently from 1a56a7a to 681910c Compare May 2, 2017 16:49
Set logging configuration using  etc/kytos/logging.ini
Fixed syslog
Fix kytos#315
@beraldoleal beraldoleal merged commit 82e2ab9 into kytos:master May 3, 2017
@macartur macartur deleted the issue-#315 branch July 11, 2017 13:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants