Skip to contents

Updates logger settings, including log level and location of the file.

Usage

set_logger(logger_file_path = "CRE.log", logger_level = "INFO")

Arguments

logger_file_path

A path (including file name) to log the messages. (Default: CRE.log)

logger_level

The log level. When a log level is set, all log levels below it are also activated (if implemented). Available levels include:

  • TRACE: Provides verbose detailed logging, including the steps taken to achieve a result, often used for debugging. Activating TRACE will also enable DEBUG, INFO, SUCCESS, WARN, ERROR, and FATAL logs.

  • DEBUG: Provides detailed logging about the flow of the application, used mostly by developers to understand potential issues. Activating DEBUG will also enable INFO, SUCCESS, WARN, ERROR, and FATAL logs.

  • INFO (Default): Standard messages that inform the user about the normal operation of the system. Activating INFO will also enable SUCCESS, WARN, ERROR, and FATAL logs.

  • SUCCESS: Messages indicating successful completion of a particular operation or task. Activating SUCCESS will also enable WARN, ERROR, and FATAL logs.

  • WARN: Warning messages about events that might cause problems in the future, but are not yet errors. Activating WARN will also enable ERROR and FATAL logs.

  • ERROR: Reports an error due to which the system may not be able to achieve its functionality, but the application won't halt. Activating ERROR will also enable FATAL logs.

  • FATAL: Reports very severe error events that will presumably lead the application to abort.

Value

No return value. This function is called for side effects.

Note

Log levels are specified by developers during the initial implementation. Future developers or contributors can leverage these log levels to better capture and document the application's processes and events.

Examples


set_logger("Debug")