RAVE
rave_pgf_logger.py File Reference

Management utilities for the logging system. More...

Classes

class  Lib.rave_pgf_logger.LogRecordStreamHandler
 Handler for a streaming logging request. More...
 
class  Lib.rave_pgf_logger.LogRecordSocketReceiver
 Simple TCP socket-based logging receiver suitable for testing, and maybe a little more. More...
 
class  Lib.rave_pgf_logger.rave_pgf_logger_server
 

Namespaces

namespace  Lib.rave_pgf_logger
 

Functions

 Lib.rave_pgf_logger.init_logger (logger, level=LOGLEVEL, logfile=LOGFILE)
 Initializes the system logger.
 
 Lib.rave_pgf_logger.log (logger, level, msg)
 Locks, logs, and unlocks, with rudimentary level filtering.
 
 Lib.rave_pgf_logger.rave_pgf_logger_client (host=PGF_HOST, port=LOGPORT, level=LOGLEVEL)
 Client logger.
 
 Lib.rave_pgf_logger.rave_pgf_syslog_client (name=LOGID, address=SYSLOG, facility=LOGFACILITY, level=LOGLEVEL)
 SysLog client.
 
 Lib.rave_pgf_logger.rave_pgf_stdout_client (name="RAVE-STDOUT", level=LOGLEVEL)
 stdout client.
 
 Lib.rave_pgf_logger.rave_pgf_logfile_client (name="RAVE-LOGFILE", level=LOGLEVEL, logfile=LOGFILE, logfilesize=LOGFILESIZE, nrlogfiles=LOGFILES)
 
 Lib.rave_pgf_logger.create_logger (level=LOGLEVEL, name=None)
 

Variables

dict Lib.rave_pgf_logger.LOGLEVELS
 
 Lib.rave_pgf_logger.tempdir
 
str Lib.rave_pgf_logger.prog = "rave_pgf_logger_server"
 
str Lib.rave_pgf_logger.usage = "usage: %s start|stop|status|restart|fg" % prog
 
 Lib.rave_pgf_logger.ARG = sys.argv[1].lower()
 
 Lib.rave_pgf_logger.this = rave_pgf_logger_server()
 
 Lib.rave_pgf_logger.myLogger = rave_pgf_syslog_client()
 

Detailed Description

Management utilities for the logging system.

Server and receiver functionality are taken almost straight from the Python documentation, with slightly better security.

Author
Daniel Michelson, SMHI
Date
2010-07-24