cpl.logging¶
cpl.logging.logger_abc¶
-
class
cpl.logging.logger_abc.
LoggerABC
¶ Bases:
abc.ABC
ABC for
cpl.logging.logger_service.Logger
-
abstract
debug
(name: str, message: str)¶ Writes a debug message
- name:
str
Message name
- message:
str
Message string
- name:
-
abstract
error
(name: str, message: str, ex: Optional[Exception] = None)¶ Writes an error
- name:
str
Error name
- message:
str
Error message
- ex:
Exception
Thrown exception
- name:
-
abstract
fatal
(name: str, message: str, ex: Optional[Exception] = None)¶ Writes an error and ends the program
- name:
str
Error name
- message:
str
Error message
- ex:
Exception
Thrown exception
- name:
-
abstract
header
(string: str)¶ Writes a header message
- string:
str
String to write as header
- string:
-
abstract
info
(name: str, message: str)¶ Writes an information
- name:
str
Message name
- message:
str
Message string
- name:
-
abstract
trace
(name: str, message: str)¶ Writes a trace message
- name:
str
Message name
- message:
str
Message string
- name:
-
abstract
warn
(name: str, message: str)¶ Writes an warning
- name:
str
Message name
- message:
str
Message string
- name:
-
abstract
cpl.logging.logger_service¶
-
class
cpl.logging.logger_service.
Logger
(logging_settings: cpl.logging.logging_settings.LoggingSettings, time_format: cpl.time.time_format_settings.TimeFormatSettings, env: cpl.environment.application_environment_abc.ApplicationEnvironmentABC)¶ Bases:
cpl.logging.logger_abc.LoggerABC
Service for logging
- logging_settings:
cpl.logging.logging_settings.LoggingSettings
Settings for the logger
- time_format:
cpl.time.time_format_settings.TimeFormatSettings
Time format settings
- env:
cpl.environment.application_environment_abc.ApplicationEnvironmentABC
Environment of the application
-
create
() → None¶ Creates path tree and logfile
-
debug
(name: str, message: str)¶ Writes a debug message
- name:
str
Message name
- message:
str
Message string
- name:
-
error
(name: str, message: str, ex: Optional[Exception] = None)¶ Writes an error
- name:
str
Error name
- message:
str
Error message
- ex:
Exception
Thrown exception
- name:
-
fatal
(name: str, message: str, ex: Optional[Exception] = None)¶ Writes an error and ends the program
- name:
str
Error name
- message:
str
Error message
- ex:
Exception
Thrown exception
- name:
-
header
(string: str)¶ Writes a header message
- string:
str
String to write as header
- string:
-
info
(name: str, message: str)¶ Writes an information
- name:
str
Message name
- message:
str
Message string
- name:
-
trace
(name: str, message: str)¶ Writes a trace message
- name:
str
Message name
- message:
str
Message string
- name:
-
warn
(name: str, message: str)¶ Writes an warning
- name:
str
Message name
- message:
str
Message string
- name:
- logging_settings: