RLRP routing  v.0.1.0
routing_logging Namespace Reference

Classes

class  LoggingHandler
 A thread class which performs all writing operations to the given logging instance. More...
 
class  LogWrapper
 Class for overriding default logging methods. More...
 

Functions

def create_routing_log (log_name, log_hierarchy)
 Create and output a logger wrap object which will be sending the logging messages to a single log thread. More...
 
def init_log_thread ()
 Initialize the log thread. More...
 
def stop_log_thread ()
 Stop the log thread. More...
 

Variables

 ABSOLUTE_PATH = os.path.dirname(os.path.abspath(__file__))
 Define an absolute path to the program's directory. More...
 
string PATH_TO_LOGS = "/var/log/adhoc_routing/"
 Define a default path to log directory. More...
 
 LOG_QUEUE = Queue.Queue()
 Define a global queue for receiving the methods from the Logger objects and its arguments. More...
 
 LOG_LEVEL = logging.CRITICAL
 Set a global variable LOG_LEVEL according to the string variable in conf file. More...
 

Detailed Description

@package routing_logging
Created on Aug 1, 2016

@author: Dmitrii Dugaev


This module creates logging instances for corresponding routing modules.
It also performs all log writing operations in a single thread, while receiving the messages via queue.

Function Documentation

def routing_logging.create_routing_log (   log_name,
  log_hierarchy 
)

Create and output a logger wrap object which will be sending the logging messages to a single log thread.

Parameters
log_nameName of the log file.
log_hierarchyHierarchy of the log.
Returns
LogWrapper object.
def routing_logging.init_log_thread ( )

Initialize the log thread.

Here is the caller graph for this function:

def routing_logging.stop_log_thread ( )

Stop the log thread.

Here is the caller graph for this function:

Variable Documentation

routing_logging.ABSOLUTE_PATH = os.path.dirname(os.path.abspath(__file__))

Define an absolute path to the program's directory.

routing_logging.LOG_LEVEL = logging.CRITICAL

Set a global variable LOG_LEVEL according to the string variable in conf file.

Log levels correspond to standard levels defined in the "logging" module.

routing_logging.LOG_QUEUE = Queue.Queue()

Define a global queue for receiving the methods from the Logger objects and its arguments.

routing_logging.PATH_TO_LOGS = "/var/log/adhoc_routing/"

Define a default path to log directory.