2019-10-08 20:58:42 +00:00
|
|
|
#include <myx/log/spdlog.hpp>
|
|
|
|
#include <myx/log/spdlog_qt.hpp>
|
2019-10-03 13:47:38 +00:00
|
|
|
|
|
|
|
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-03 13:47:38 +00:00
|
|
|
|
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-03 13:47:38 +00:00
|
|
|
|
|
|
|
qInstallMessageHandler( ML::spdlog_qt_message_handler );
|
|
|
|
|
2019-10-04 12:33:49 +00:00
|
|
|
qInfo() << "info";
|
|
|
|
qDebug() << "debug";
|
2019-10-03 13:47:38 +00:00
|
|
|
|
|
|
|
spdlog::set_pattern( "[%H:%M:%S %z] %v" );
|
|
|
|
|
2019-10-04 12:33:49 +00:00
|
|
|
qInfo( "new info" );
|
|
|
|
qDebug( "new debug" );
|
2019-10-03 13:47:38 +00:00
|
|
|
return( 0 );
|
|
|
|
}
|