[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #12882 [Onionoo]: Logging Framework
#12882: Logging Framework
-----------------------------+----------------------
Reporter: iwakeh | Owner: iwakeh
Type: enhancement | Status: assigned
Priority: normal | Milestone:
Component: Onionoo | Version:
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
-----------------------------+----------------------
Comment (by karsten):
Agreed about the suggested two sinks for metrics and logging. That
reminds me of another important requirement: the logging part should be
split up into informational messages and warnings or errors. The former
can be written to files in a "logrotate" style, the latter must be
included in emails sent out by cron.
Let me explain how this works right now: the cron part of Onionoo uses
`System.out` for informational messages and `System.err` for errors and
warnings. The Ant target `"run"` has `error="errors"` set, so that errors
and warnings are written (not appended) to the local `errors` file. Cron
calls Ant with the following command: `ant run >> log && cat errors`.
That means that informational messages are appended to `log` and
everything in the `errors` file gets mailed to me once the cronjob
finishes.
For completeness, here's how logging in Tomcat is currently used: there
are a few calls to `System.err` (which could also be `System.out` calls)
in the server package. Those lines are appended to Tomcat's
`catalina.out` file. Any other file would be fine, too, this is just
where it happens to log right now.
As for identifying errors, warnings, and informational log entries, I
think the current `System.out` and `System.err` statements might be a fine
start. All these can be turned into calls to the logging framework.
And to answer your question: no, I don't process logs automatically.
Want to apply one of the mentioned logging frameworks and try it in the
Vagrant environment?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12882#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs