myxlib/examples/log/01_minimal/minimal.cpp

24 lines
437 B
C++
Raw Normal View History

#include <myx/log/spdlog.hpp>
namespace ML = myx::log;
int main( int argc, char** argv )
{
2019-10-04 12:33:49 +00:00
(void)argc;
(void)argv;
ML::default_logger.enableStdoutSink();
2019-10-04 12:33:49 +00:00
spdlog::register_logger( ML::default_logger.logger() );
spdlog::set_default_logger( ML::default_logger.logger() );
2019-10-04 12:33:49 +00:00
ML::info( "info" );
ML::trace( "trace" );
spdlog::set_pattern( "[%H:%M:%S %z] %v" );
2019-10-04 12:33:49 +00:00
ML::info( "new info" );
ML::trace( "new trace" );
return( 0 );
}