Skip to content

Commit

Permalink
#5231: Remove static LogStream instances
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Apr 29, 2020
1 parent a99f360 commit 38a8fa1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
18 changes: 0 additions & 18 deletions radiant/log/LogStream.cpp
Expand Up @@ -23,24 +23,6 @@ LogStream::~LogStream()
}
}

std::ostream& getGlobalOutputStream()
{
static LogStream _stream(LogLevel::Standard);
return _stream;
}

std::ostream& getGlobalErrorStream()
{
static LogStream _stream(LogLevel::Error);
return _stream;
}

std::ostream& getGlobalWarningStream()
{
static LogStream _stream(LogLevel::Warning);
return _stream;
}

void LogStream::InitialiseStreams(ILogWriter& logWriter)
{
// Instantiate a temporary buffer, which copies the log until the
Expand Down
8 changes: 2 additions & 6 deletions radiant/log/LogStream.h
Expand Up @@ -4,7 +4,8 @@
#include <mutex>
#include "LogStreamBuf.h"

namespace applog {
namespace applog
{

/**
* greebo: A LogStream is a specialised std::ostream making
Expand Down Expand Up @@ -40,9 +41,4 @@ class LogStream :
static std::mutex& GetStreamLock();
};

// Accessors to the singleton log streams
std::ostream& getGlobalOutputStream();
std::ostream& getGlobalErrorStream();
std::ostream& getGlobalWarningStream();

} // namespace applog

0 comments on commit 38a8fa1

Please sign in to comment.