Initializes the BasaltLogger, creates the log stream (Transform). The log stream processes the log entries and executes the logging strategies.
Adds a logging strategy.
The name of the strategy.
The strategy to add. (LoggerStrategy)
(BasaltError) - If the strategy is already added. (GLOBAL_KEY_ERROR.STRATEGY_ALREADY_ADDED)
Logs an error message.
The object to log.
Optional
strategiesNames: string[]The names of the strategies to use. (default: all strategies)
(BasaltError) - If no strategy is added. (GLOBAL_KEY_ERROR.NO_STRATEGY_ADDED)
Logs an info message.
The object to log.
Optional
strategiesNames: string[]The names of the strategies to use. (default: all strategies)
(BasaltError) - If no strategy is added. (GLOBAL_KEY_ERROR.NO_STRATEGY_ADDED)
Removes a logging strategy by name.
The name of the strategy.
(BasaltError) - If the strategy is not found. (GLOBAL_KEY_ERROR.STRATEGY_NOT_FOUND)
Logs a warn message.
The object to log.
Optional
strategiesNames: string[]The names of the strategies to use. (default: all strategies)
(BasaltError) - If no strategy is added. (GLOBAL_KEY_ERROR.NO_STRATEGY_ADDED)
BasaltLogger provides a flexible logging system that allows multiple strategies for log output.