N2PLog#

class NaxToPy.Core.Errors.N2PLog.N2PLog[source]#

Bases: ABC

Class prepared for the control of the program.

It uses the module logging to register the main instructions and data of the NaxToPy Package. It can’t be instanced.

LevelList#
class property LevelList: list[str]#

Property that retuns the list with the message levels in the log

classmethod activate_log() None[source]#

Method that activates the .log

clv = 'WARNING'#
classmethod deactivate_log() None[source]#

Method that deactivates the .log

flv = 'INFO'#
classmethod get_directory() str[source]#

Method that returns the folder where the .log file is being saved

classmethod get_file_name() str[source]#

Method that returns the name of the file of the .log

classmethod set_console_level(clv: Literal['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']) None[source]#

Method to set a different level for console register. The default level is “WARNING”. Only The level register and higher will be printed in the console. The possible levels are:

“DEBUG”, “INFO”, “WARNING”, “ERROR”, “CRITICAL”.

classmethod set_directory(value: str) None[source]#

Method that sets the folder where the .log file must be saved

Parameters:

value – str -> Path to the folder where the .log must be saved.

classmethod set_file_level(flv: Literal['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']) None[source]#

Method to set a different level for the file .log of the register. The default level is “INFO”. Only The level register and higher will be printed in the .log file. Higher levels could make more difficult to track errors. The possible levels are:

“DEBUG”, “INFO”, “WARNING”, “ERROR”, “CRITICAL”.

classmethod set_file_name(value: str) None[source]#

Method that sets the name of the file of the .log

Parameters:

value – str -> Name of the .log file