Log interface¶
Basic logging setup.
-
rayvision_log.core.
get_default_log_config
()¶ Get the default logging configuration.
Returns: The default logging configuration. Return type: dict
-
rayvision_log.core.
init_logger
(app_name, log_folder=None, log_name=None)¶ Initialize logging with our default configuration.
An easier interface for artists to use to create loggers in their packages and applications. Any application that uses this will use the default logging configuration.
Examples
>>> import logging >>> from rayvision_log import init_logger >>> app_name = "rayvision_api" >>> init_logger(app_name) >>> LOG = logging.getLogger(app_name)
Parameters:
-
rayvision_log.core.
set_up_logger
(app_name, log_config, use_orginal=False, log_folder=None, log_name=None)¶ Set up loggers based on given name and configuration.
Example
>>> app_name = "rayvision_api" >>> log_config = { formatters: { file: { format: '%(asctime)s [%(levelname)s] %(name)s: %(message)s' } }, handlers: { file: { class: concurrent_log_handler.ConcurrentRotatingFileHandler } } }
Parameters: References
https://pypi.org/project/ConcurrentLogHandler/
Returns: log path