Commit 2a18e5b7 authored by Pablo Toharia's avatar Pablo Toharia
Browse files

Change of the class Log to Logger.

parent 60ce1dd1
......@@ -4,7 +4,7 @@
int main( void )
{
example::Log logger( "log", std::cerr, example::LOG_LEVEL_VERBOSE );
example::Logger logger( "log", std::cerr, example::LOG_LEVEL_VERBOSE );
logger.log( "Hello log!", example::LOG_LEVEL_VERBOSE, EXAMPLE_FILE_LINE );
std::this_thread::sleep_for(std::chrono::seconds(1));
......
......@@ -38,20 +38,20 @@ namespace @SILO_NAMESPACE@
* class to log output
*
*/
class Log
class Logger
{
public:
Log( const std::string& logName_ = "",
std::ostream& stream_ = std::cerr,
TLogLevel logLevel_ =
Logger( const std::string& logName_ = "",
std::ostream& stream_ = std::cerr,
TLogLevel logLevel_ =
#ifdef DEBUG
LOG_LEVEL_WARNING
LOG_LEVEL_WARNING
#else
LOG_LEVEL_ERROR
LOG_LEVEL_ERROR
#endif
,
bool coloredOutput_ = true
,
bool coloredOutput_ = true
)
: _logName( logName_ )
, _startTime( std::chrono::system_clock::now( ))
......@@ -120,7 +120,7 @@ namespace @SILO_NAMESPACE@
const std::string& fileAndLine = "" )
{
#ifdef @SILO_NAME@_WITH_LOGGING
Log::log( msg, *_stream, level, fileAndLine );
this->log( msg, *_stream, level, fileAndLine );
#endif
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment