Am 07.01.2011 12:41, schrieb nap: > I don't the he logging point. The main thing/problem here is "what if > the daemon is not initialized" ? Logging/print/what ever don't change > anything here. Use the logging module, or a simple print don't change > anything that the user need: > *global log -> brok module because all logs are broks in daemons > *local logs for "debuging" purpose, only and if only the user want it. > He want to debug a offline daemon too. And the only place where we can > put this log place is in the ini file. This point is: When using the standard logging module, the choice is given into the admins hands. He can decide what to log locally and what to send remotely. This can easily be changes in the config file. He can even decide to add another logging destination, e.g. syslog or NT event log. Or (with some additional programming) add sophisticated filters to decide what to send to which logging stream.
All of this is already implemented in the std. logging module. There is no need to reinvent the weel and there is no need to decided within the shinken code what should be logged where and when. *Everything* is send to the std. logging module and the configuration routes the message to where it belongs. If you are new to the standard logging module, please have a look at <http://docs.python.org/library/logging.html#configuring-logging> and look for the logging.conf example. This example defines > After, a print or a logging I don't care. Print is good for what we > are doing, I do not see what problem the loggin will solve here. The main point for logging is: You get both local an remote logging for free. Plus filtering on levels. Plus add additional logging destinations. Plus ... > replacement. But it won't solve the ini local_log thing. There are 2 > differents problems. It does :-) Because on call call log to several logging destinations. The default config would simply contain two log targets: one remote (using the current mechanism for sending logs to the broker) and one local (rotating log file, errors and warnings). If some admin wants more local logging, he simply changes the config file. @all: Please do not full quote. Thanks! -- Schönen Gruß - Regards Hartmut Goebel Dipl.-Informatiker (univ.), CISSP, CSSLP Goebel Consult Spezialist für IT-Sicherheit in komplexen Umgebungen http://www.goebel-consult.de Monatliche Kolumne: http://www.cissp-gefluester.de/ Goebel Consult mit Mitglied bei http://www.7-it.de
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Gaining the trust of online customers is vital for the success of any company that requires sensitive data to be transmitted over the Web. Learn how to best implement a security strategy that keeps consumers' information secure and instills the confidence they need to proceed with transactions. http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________ Shinken-devel mailing list Shinken-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shinken-devel