updated example
This commit is contained in:
		@@ -75,14 +75,15 @@ int main(int, char* [])
 | 
			
		||||
        auto async_file= spd::daily_logger_st("async_file_logger", "logs/async_log.txt");
 | 
			
		||||
        async_file->info() << "This is async log.." << "Should be very fast!";
 | 
			
		||||
        
 | 
			
		||||
        //
 | 
			
		||||
        // syslog example
 | 
			
		||||
        //
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
#ifdef __linux__
 | 
			
		||||
        std::string ident = "my_app";
 | 
			
		||||
        auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID | LOG_PERROR);
 | 
			
		||||
        syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!");
 | 
			
		||||
        // syslog example                
 | 
			
		||||
        std::string ident = "spdlog-example";
 | 
			
		||||
        auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID);
 | 
			
		||||
        syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!");       
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    catch (const spd::spdlog_ex& ex)
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user