improved consistency in argument handling, introduction of dpm_con (not everything needs to be in the log)
This commit is contained in:
@@ -77,6 +77,18 @@ public:
|
||||
*/
|
||||
void log(LoggingLevels log_level, const std::string& message);
|
||||
|
||||
/**
|
||||
* @brief Logs a message to console only
|
||||
*
|
||||
* Writes a log message only to the console, skipping any file logging.
|
||||
* Messages with levels FATAL, ERROR, or WARN are written to stderr,
|
||||
* while others go to stdout.
|
||||
*
|
||||
* @param level The severity level of the message
|
||||
* @param message The message to log
|
||||
*/
|
||||
void log_console(LoggingLevels level, const std::string& message);
|
||||
|
||||
/**
|
||||
* @brief Sets the log file path
|
||||
*
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
#include "dpm_interface_helpers.hpp"
|
||||
#include "Logger.hpp"
|
||||
|
||||
#include <handlers.hpp>
|
||||
|
||||
/**
|
||||
* @defgroup dpm_interface DPM Interface Methods
|
||||
* @brief Interface methods for the DPM command-line tool
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
#include <iostream>
|
||||
#include "error.hpp"
|
||||
#include "LoggingLevels.hpp"
|
||||
#include "module_interface.hpp"
|
||||
|
||||
/**
|
||||
* @brief Main error handler that dispatches to specific handlers
|
||||
|
||||
@@ -121,6 +121,17 @@ extern "C" {
|
||||
*/
|
||||
void dpm_log(int level, const char* message);
|
||||
|
||||
/**
|
||||
* @brief Logs messages to console only
|
||||
*
|
||||
* Allows modules to log messages to the console only, skipping any file logging.
|
||||
* This is useful for user-facing output that doesn't need to be recorded.
|
||||
*
|
||||
* @param level The log level as an integer (0=FATAL, 1=ERROR, 2=WARN, 3=INFO, 4=DEBUG)
|
||||
* @param message The message to log
|
||||
*/
|
||||
void dpm_con(int level, const char* message);
|
||||
|
||||
/**
|
||||
* @brief Sets the logging level
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user