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

24 lines
437 B
C++

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