mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-25 02:37:44 +02:00
Merge Log#Log() methods
This commit is contained in:
parent
a3a6a8ab21
commit
481ef9ea72
@ -346,17 +346,13 @@ void Logger::UpdateCheckObjectFilterCache()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log::Log(LogSeverity severity, String facility, const String& message)
|
Log::Log(LogSeverity severity, String facility, const String& message)
|
||||||
: Log(severity, std::move(facility))
|
: m_Severity(severity), m_Facility(std::move(facility)), m_IsNoOp(severity < Logger::GetMinLogSeverity())
|
||||||
{
|
{
|
||||||
if (!m_IsNoOp) {
|
if (!m_IsNoOp && !message.IsEmpty()) {
|
||||||
m_Buffer << message;
|
m_Buffer << message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::Log(LogSeverity severity, String facility)
|
|
||||||
: m_Severity(severity), m_Facility(std::move(facility)), m_IsNoOp(severity < Logger::GetMinLogSeverity())
|
|
||||||
{ }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the message to the application's log.
|
* Writes the message to the application's log.
|
||||||
*/
|
*/
|
||||||
|
@ -122,9 +122,7 @@ public:
|
|||||||
Log(const Log& other) = delete;
|
Log(const Log& other) = delete;
|
||||||
Log& operator=(const Log& rhs) = delete;
|
Log& operator=(const Log& rhs) = delete;
|
||||||
|
|
||||||
Log(LogSeverity severity, String facility, const String& message);
|
Log(LogSeverity severity, String facility, const String& message = String());
|
||||||
Log(LogSeverity severity, String facility);
|
|
||||||
|
|
||||||
~Log();
|
~Log();
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user