Примеры журналирования
This commit is contained in:
21
examples/log/01_minimal/minimal.cpp
Normal file
21
examples/log/01_minimal/minimal.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "log/spdlog.hpp"
|
||||
|
||||
namespace ML = myx::log;
|
||||
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
ML::defaultLogger.enableStdoutSink();
|
||||
|
||||
spdlog::register_logger( ML::defaultLogger.logger() );
|
||||
spdlog::set_default_logger( ML::defaultLogger.logger() );
|
||||
|
||||
ML::info( "aaaa" );
|
||||
ML::trace( "bbbb" );
|
||||
|
||||
spdlog::set_pattern( "[%H:%M:%S %z] %v" );
|
||||
|
||||
ML::info( "aaaa 111" );
|
||||
ML::trace( "bbbb 111" );
|
||||
return( 0 );
|
||||
}
|
Reference in New Issue
Block a user