- switch (level) {
- case LogLevel::Debug:
- logString = "[Debug] ";
- break;
- case LogLevel::Info:
- logString = "[Info ] ";
- break;
- case LogLevel::Warning:
- logString = "[Warn ] ";
- break;
- case LogLevel::Error:
- logString = "[Error] ";
- break;
- case LogLevel::Fatal:
- logString = "[FATAL] ";
- break;
+ // Only add the log level to the message if we do not output to syslog
+ if (!_syslogEnabled) {
+ switch (level) {
+ case LogLevel::Debug:
+ logString = "[Debug] ";
+ break;
+ case LogLevel::Info:
+ logString = "[Info ] ";
+ break;
+ case LogLevel::Warning:
+ logString = "[Warn ] ";
+ break;
+ case LogLevel::Error:
+ logString = "[Error] ";
+ break;
+ case LogLevel::Fatal:
+ logString = "[FATAL] ";
+ break;
+ }