25 #ifndef WLOGGERWRAPPER_H
26 #define WLOGGERWRAPPER_H
32 #include <boost/tuple/tuple.hpp>
34 #include "core/common/WLogStream.h"
35 #include "core/common/WLogger.h"
108 void error( std::string
const& location, std::string
const& message );
116 void warning( std::string
const& location, std::string
const& message );
124 void info( std::string
const& location, std::string
const& message );
132 void debug( std::string
const& location, std::string
const& message );
std::shared_ptr< WLogStream > SharedPtr
shared pointer type
void warning(std::string const &location, std::string const &message)
Output a warning to the logs.
void debug(std::string const &location, std::string const &message)
Output a debug message.
void removeFileStreamNumber(size_t i)
Helper function that removes the file stream with the given index.
void removeAllFileStreams()
Remove all files to which the logger writes (and which were added by this wrapper).
std::vector< FileStreamEntry > m_fileStreamList
List of file streams.
void error(std::string const &location, std::string const &message)
Output an error to the logs.
WLoggerWrapper()
Constructor.
bool addFileStream(std::string filename)
Add a file to which the logger output will be written.
~WLoggerWrapper()
Destructor.
bool removeFileStream(std::string filename)
Remove a file to which the logger writes.
void info(std::string const &location, std::string const &message)
Output information to the logs.
WLogger * m_logger
A pointer to the logger.
This class defines the interface for adding logs and managing several output streams for them.
A helper class for storing information about file streams that we added to the logger.
std::string m_filename
The name of the log file.
WLogStream::SharedPtr m_WLogStream
The logstream instance.
std::shared_ptr< std::ofstream > m_fileStream
The actual stream.