-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate and store logs #5
Comments
The python logging module can be used to generate the logs. |
@alexdor why write at the system logs? Also using logger will make it OS specific (as soon as we solve #4 the script will be able to run on any OS with Python installed). I've already implemented a basic logging mechanism for RSPET, we can take this to use it out of the box asap and once we get a bit of free time migrate to @wandeg 's suggestion of the logging module. |
Because it's easier to manage logs, from a sysadmin's standpoint, when they are centralized. But keeping it platform agnostic is important so let's use your implementation. |
It might also be better just to log to stdout. You can use logger as @panagiks suggested. Then you decide where to send standard out when you run the script. This is commonly done in cron and init/upstart scripts. It makes the application not care where the logs go, which is a nice pattern. |
@alexdor would it be easy for you to make a list of the things you think that should be logged? |
Sure, when debugging flag is enabled, everything should be logged (published message as well as the verbose answer from the broker). When the flag is disabled, it should only log failures (unable to publish, connection refused, unable to log in etc.). Timestamps would be nice as well. |
PfCounter should generate and store logs. I don't know if python has a proper implementation for storing app logs to system's logs. We could, probably, use logger though.
The text was updated successfully, but these errors were encountered: