Re: [Shinken-devel] Planning the new log-system
Status: Beta
Brought to you by:
naparuba
From: Hartmut G. <h.g...@cr...> - 2012-08-28 17:54:13
|
Am 27.08.2012 17:06, schrieb nap: > > 1) Should messages go to stdout/stderr by default? > > IMHO messages should go to stdout or stderr *only* in two cases: > > a) While rading the config-file > b) If the user runs the daemon with some "--verbose" option. > > That's the --debug option I think. In the other cases (without it) in > fact the daemonize function will close the file descriptors 0 and 1. > With --debug, it will link theses FDs to the debug file. Does this mean: Without --daemon one will get the debug-mode automatically? > > > > 2) Should messages send via broks be terminated by '\n'? > > Good point, I don't remember. I think keeping the \n won't hurt so we > don't have to make a difference between print versions and brok ones. With the new log-system, the \n would have to be added. I will remove it in a second step. > > > 3) Are level-names allowed to be upper-case? Or is there any program > known to rely on these to be capitalized text? > > All Nagios related tools are using upper cases logs, because it's how > the classic WARNING, CRITICAL logs are. Fine. Then I'll change to uppercase, too. > > > 4) Should all messages (above the set level) be send to the broker, > even e.g. those about reading the config file? > > Yes, because it's always good to see which configuration files you are > reading, and what is the current working directory of your daemon, and > your Pyro URI, etc etc. such informations are very useful. Fine, this eases implementation :-) > > 5) Do we need 'human format' for messages send as broks, too? > > I think the human format was an error, and we should never allow such > "format" at the beginning. We can send them, they won't be readable by > tools, but the comment on this parameter is clear about that :) Implementing the human-format seams to become complicated -- more than it seams to have use. What do you think about this proposal: - for brok-messages: no human format at all - for console-outpur: always human format - for local-log: always human format An I'll change the human format to the standard format2012-08-27 19:23:45,123. -- Regards Hartmut Goebel | Hartmut Goebel | h.g...@cr... | | www.crazy-compilers.com | compilers which you thought are impossible | |