pigeon.utils.logger¶
Module Contents¶
- class pigeon.utils.logger.Manager¶
Used to manage settings and load specified middleware which is only loaded at runtime.
To override settings either the method Manager.override or the Manager.__get_attr__ method is used:
# override settings using a module or similar behaving object my_settings: types.ModuleType = ... Manager.override(my_settings) # override settings one at a time by accessing the attributes (__getattr__) Manager.my_setting = my_value
- classmethod override(new_settings: types.ModuleType | Any)¶
Overrides current settings with new settings provided.
- Parameters:
new_settings – New settings to override old ones with
- pigeon.utils.logger.lock¶
- pigeon.utils.logger.print¶
- class pigeon.utils.logger.Log(name, color='#ffffff', subname='')¶
- max_name_length = 15¶
- off_color = '[#8888aa]'¶
- critical(*args, end='\n', subname='')¶
- error(*args, end='\n', subname='')¶
- warning(*args, end='\n', subname='')¶
- info(*args, end='\n', subname='')¶
- verbose(*args, end='\n', subname='')¶
- debug(*args, prefix='', end='\n', subname='')¶
- sublog(*args, color='white][/', end='\n')¶
For log messages that give extra context and details on the previous logmessage. They will only be logged if the previous log message was logged as well.
- action(*args, end='\n', subname='')¶
- ask_user(*args, end='', subname='')¶
Waits for input of user [y/n] returns True or False dependent on input