mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 02:53:10 +01:00
supress LogStream empty line log entries; ignore VS profiler files
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -13,6 +13,8 @@
|
||||
*.la
|
||||
*.a
|
||||
*.d
|
||||
*.vsp
|
||||
*.psess
|
||||
|
||||
# Make #
|
||||
########
|
||||
|
||||
@@ -46,11 +46,14 @@ void LogStreamBuf::setPriority(Message::Priority priority)
|
||||
int LogStreamBuf::writeToDevice(char c)
|
||||
{
|
||||
if (c == '\n' || c == '\r')
|
||||
{
|
||||
if (_message.find_first_not_of("\r\n") != std::string::npos)
|
||||
{
|
||||
Message msg(_logger.name(), _message, _priority);
|
||||
_message.clear();
|
||||
_logger.log(msg);
|
||||
}
|
||||
}
|
||||
else _message += c;
|
||||
return c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user