attaching schema nodes progress
This commit is contained in:
@@ -93,7 +93,7 @@ public:
|
||||
* @param source Source of the log message
|
||||
* @param message Message to log
|
||||
*/
|
||||
void log(log_level lvl, const std::string &source, const char *message);
|
||||
void log(log_level lvl, const std::string &source, const char *message) const;
|
||||
|
||||
/**
|
||||
* Clears the list of log sinks
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
void clear();
|
||||
|
||||
private:
|
||||
void get_time_stamp(char* timestamp_buffer);
|
||||
void get_time_stamp(char* timestamp_buffer) const;
|
||||
|
||||
private:
|
||||
static std::map<log_level, std::string> level_strings;
|
||||
@@ -111,7 +111,7 @@ private:
|
||||
|
||||
log_level_range log_level_range_;
|
||||
|
||||
std::mutex mutex_;
|
||||
mutable std::mutex mutex_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void fatal(const std::string &what, ARGS const &... args) { fatal(what.c_str(), args...); }
|
||||
void fatal(const std::string &what, ARGS const &... args) const { fatal(what.c_str(), args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message represented by a char pointer with log level LVL_FATAL
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void fatal(const char *what, ARGS const &... args) { log(log_level::LVL_FATAL, what, args...); }
|
||||
void fatal(const char *what, ARGS const &... args) const { log(log_level::LVL_FATAL, what, args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message string with log level LVL_FATAL
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void error(const std::string &what, ARGS const &... args) { error(what.c_str(), args...); }
|
||||
void error(const std::string &what, ARGS const &... args) const { error(what.c_str(), args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message represented by a char pointer with log level LVL_FATAL
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void error(const char *what, ARGS const &... args) { log(log_level::LVL_ERROR, what, args...); }
|
||||
void error(const char *what, ARGS const &... args) const { log(log_level::LVL_ERROR, what, args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message string with log level LVL_FATAL
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void warn(const std::string &what, ARGS const &... args) { warn(what.c_str(), args...); }
|
||||
void warn(const std::string &what, ARGS const &... args) const { warn(what.c_str(), args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message represented by a char pointer with log level LVL_FATAL
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void warn(const char *what, ARGS const &... args) { log(log_level::LVL_WARN, what, args...); }
|
||||
void warn(const char *what, ARGS const &... args) const { log(log_level::LVL_WARN, what, args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message string with log level LVL_FATAL
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void info(const std::string &what, ARGS const &... args) { info(what.c_str(), args...); }
|
||||
void info(const std::string &what, ARGS const &... args) const { info(what.c_str(), args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message represented by a char pointer with log level LVL_FATAL
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void info(const char *what, ARGS const &... args) { log(log_level::LVL_INFO, what, args...); }
|
||||
void info(const char *what, ARGS const &... args) const { log(log_level::LVL_INFO, what, args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message string with log level LVL_FATAL
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void debug(const std::string &what, ARGS const &... args) { debug(what.c_str(), args...); }
|
||||
void debug(const std::string &what, ARGS const &... args) const { debug(what.c_str(), args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message represented by a char pointer with log level LVL_FATAL
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void debug(const char *what, ARGS const &... args) { log(log_level::LVL_DEBUG, what, args...); }
|
||||
void debug(const char *what, ARGS const &... args) const { log(log_level::LVL_DEBUG, what, args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message string with log level LVL_FATAL
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void trace(const std::string &what, ARGS const &... args) { trace(what.c_str(), args...); }
|
||||
void trace(const std::string &what, ARGS const &... args) const { trace(what.c_str(), args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message represented by a char pointer with log level LVL_FATAL
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void trace(const char *what, ARGS const &... args) { log(log_level::LVL_TRACE, what, args...); }
|
||||
void trace(const char *what, ARGS const &... args) const { log(log_level::LVL_TRACE, what, args...); }
|
||||
|
||||
/**
|
||||
* Writes a log message represented by a char pointer
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
* @param args The arguments to be replaced in the message
|
||||
*/
|
||||
template<typename ... ARGS>
|
||||
void log(log_level lvl, const char *what, ARGS const &... args);
|
||||
void log(log_level lvl, const char *what, ARGS const &... args) const;
|
||||
|
||||
/**
|
||||
* Writes a log message represented by a char pointer
|
||||
@@ -207,14 +207,14 @@ public:
|
||||
*
|
||||
* @return Represented log source name
|
||||
*/
|
||||
const std::string& source() const;
|
||||
[[nodiscard]] const std::string& source() const;
|
||||
|
||||
/**
|
||||
* Returns the name of the connected log domain
|
||||
*
|
||||
* @return The name of the log domain
|
||||
*/
|
||||
std::string domain() const;
|
||||
[[nodiscard]] std::string domain() const;
|
||||
|
||||
private:
|
||||
std::string source_;
|
||||
@@ -222,8 +222,7 @@ private:
|
||||
};
|
||||
|
||||
template<typename... ARGS>
|
||||
void logger::log(log_level lvl, const char *what, ARGS const &... args)
|
||||
{
|
||||
void logger::log(log_level lvl, const char *what, ARGS const &... args) const {
|
||||
char message_buffer[16384];
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
Reference in New Issue
Block a user