events_protocol.core.logging.picpay_logger
¶
Module Contents¶
-
class
events_protocol.core.logging.picpay_logger.
PicpayLogger
(cls, level: int = logging.INFO, environment: str = 'PRD')¶ Bases:
logging.Logger
Create and format loggers in the PicPay standard format
- level: int
Logging level. Set using the enum defined in the logging std library
- logging.Logger
Interface to use the logs of the logging library
-
logger_name
= events_protocol¶
-
version
:str = UNDEFINED¶
-
is_production_environment
:bool = True¶
-
internal_logger
:logging.Logger¶
-
classmethod
set_version
(cls, version: str)¶ Set application version that will be logged
- version: str
Application version
-
__create_logger_with_environment
(self, name: str = 'events_protocol', environment: str = 'PRD')¶ Creates the logger using the desired environment
- name: str
Application version
- environment: str
Set the current environment that will be used in the application. If it’s PRD or HML it will format the logger in the PicPay application standards. Otherwise it’ll use development settings Default PRD
-
__dev_log
(self, level, message, *args, **kawrgs)¶ Default logger. Used for development environment.
- level: int
Logging level. Set using the enum defined in the logging std library
- message: str
Message that will be send to the logger
-
__prod_log
(self, level, message, *args, **kwargs)¶ Production format logger. Used for production and QA environment.
- level: int
Logging level. Set using the enum defined in the logging std library
- message: str
Message that will be send to the logger
-
_log
(self, level, message, *args, **kwargs)¶ Overrides log method of the logging library
- level: int
Logging level. Set using the enum defined in the logging std library
- message: str
Message that will be send to the logger