bmSearch  0.0.4
Public Member Functions | Static Public Attributes | List of all members
logger.logger Class Reference

Public Member Functions

def __init__ (self)
 
def add (self, level, string)
 
def catch (self, string)
 

Static Public Attributes

 file_handler
 
 formatter
 
 logFile = config.logFile
 
 logFileBackup = config.logFileBackup
 
 logFileSize = config.logFileSize
 
 logger
 

Constructor & Destructor Documentation

def logger.logger.__init__ (   self)
__init__:
        init the logger in DEBUG mode.
24  def __init__(self):
25  """
26  __init__:
27  init the logger in DEBUG mode.
28 
29  """

Member Function Documentation

def logger.logger.add (   self,
  level,
  string 
)
add :
        add lines to appender(file log).
        Args are :
- (str) level 
- (str) string, a more explicative information.


        Log Levels:         
CRITICAL         50
ERROR            40
WARNING          30
INFO             20
DEBUG            10
52  def add(self, level, string):
53  """
54  add :
55  add lines to appender(file log).
56  Args are :
57  - (str) level
58  - (str) string, a more explicative information.
59 
60 
61  Log Levels:
62  CRITICAL 50
63  ERROR 40
64  WARNING 30
65  INFO 20
66  DEBUG 10
67  """
68  if level.lower() == "debug":
69  self.logger.debug(string)
70 
71  if level.lower() == "info":
72  self.logger.info(string)
73 
74  if level.lower() == "warning":
75  self.logger.warning(string)
76 
77  if level.lower() == "error":
78  self.logger.error(string)
79 
80  if level.lower() == "critical":
81  self.logger.critical(string)
82 
83 
84 
def logger.logger.catch (   self,
  string 
)
catch:
        feed the logger with string
43  def catch(self, string):
44  """
45  catch:
46  feed the logger with string
47  """
48  logging.exception(string)
49 
50 
51 

Member Data Documentation

logger.logger.file_handler
static
logger.logger.formatter
static
logger.logger.logFile = config.logFile
static
logger.logger.logFileBackup = config.logFileBackup
static
logger.logger.logFileSize = config.logFileSize
static
logger.logger.logger
static

The documentation for this class was generated from the following file: