RPKI Engine  1.0
Classes | Functions | Variables
rpki::log Namespace Reference

Classes

class  logger

Functions

def init
def log_repr
def set_trace
def trace
def traceback

Variables

tuple debug = logger(syslog.LOG_DEBUG)
 enable_trace = False
 Whether call tracing is enabled.
 enable_tracebacks = False
 Whether tracebacks are enabled globally.
tuple error = logger(syslog.LOG_ERR)
tuple info = logger(syslog.LOG_INFO)
tuple note = logger(syslog.LOG_NOTICE)
int pid = 0
 show_python_ids = False
 Whether __repr__() methods should show Python id numbers.
string tag = ""
 use_syslog = True
 Whether to use syslog.
tuple warn = logger(syslog.LOG_WARNING)

Detailed Description

Logging facilities for RPKI libraries.

$Id: log.py 4027 2011-10-07 23:38:53Z sra $

Copyright (C) 2009--2011  Internet Systems Consortium ("ISC")

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

Portions copyright (C) 2007--2008  American Registry for Internet Numbers ("ARIN")

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND ARIN DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS.  IN NO EVENT SHALL ARIN BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

Function Documentation

def rpki::log::init (   ident = "rpki",
  flags = syslog.LOG_PID,
  facility = syslog.LOG_DAEMON 
)
Initialize logging system.

Definition at line 62 of file log.py.

def rpki::log::log_repr (   obj,
  tokens 
)
Constructor for __repr__() strings, handles suppression of Python
IDs as needed, includes self_handle when available.

Definition at line 132 of file log.py.

def rpki::log::set_trace (   enable)
Enable or disable call tracing.

Definition at line 74 of file log.py.

def rpki::log::trace ( )
Execution trace -- where are we now, and whence came we here?

Definition at line 102 of file log.py.

References debug.

def rpki::log::traceback (   do_it = None)
Consolidated backtrace facility with a bit of extra info.  Argument
specifies whether or not to log the traceback (some modules and
classes have their own controls for this, this lets us provide a
unified interface).  If no argument is specified, we use the global
default value rpki.log.enable_tracebacks.

Definition at line 111 of file log.py.

References error, and warn.


Variable Documentation

tuple rpki::log::debug = logger(syslog.LOG_DEBUG)

Definition at line 100 of file log.py.

Referenced by trace().

Whether call tracing is enabled.

Definition at line 41 of file log.py.

Whether tracebacks are enabled globally.

Individual classes and modules may choose to override this.

Definition at line 57 of file log.py.

tuple rpki::log::error = logger(syslog.LOG_ERR)

Definition at line 96 of file log.py.

Referenced by traceback().

tuple rpki::log::info = logger(syslog.LOG_INFO)

Definition at line 99 of file log.py.

tuple rpki::log::note = logger(syslog.LOG_NOTICE)

Definition at line 98 of file log.py.

int rpki::log::pid = 0

Definition at line 60 of file log.py.

Whether __repr__() methods should show Python id numbers.

Definition at line 51 of file log.py.

string rpki::log::tag = ""

Definition at line 59 of file log.py.

Whether to use syslog.

Definition at line 46 of file log.py.

tuple rpki::log::warn = logger(syslog.LOG_WARNING)

Definition at line 97 of file log.py.

Referenced by traceback().

 All Classes Namespaces Files Functions Variables Properties