Support custom eol style using a define in tweakme.h
By default use the platform convention (i.e. "\r\n" on windows), but make it possible to set a custom end-of-line string without implementing a custom formatter.
This commit is contained in:
		@@ -619,7 +619,11 @@ inline void spdlog::pattern_formatter::format(details::log_msg& msg)
 | 
			
		||||
            f->format(msg, tm_time);
 | 
			
		||||
        }
 | 
			
		||||
        //write eol
 | 
			
		||||
#if defined(SPDLOG_EOL)
 | 
			
		||||
        msg.formatted << SPDLOG_EOL;
 | 
			
		||||
#else
 | 
			
		||||
        msg.formatted << details::os::eol();
 | 
			
		||||
#endif
 | 
			
		||||
    }
 | 
			
		||||
    catch(const fmt::FormatError& e)
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -63,3 +63,8 @@
 | 
			
		||||
// Uncomment to enable usage of wchar_t for file names on Windows.
 | 
			
		||||
// #define SPDLOG_WCHAR_FILENAMES
 | 
			
		||||
///////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
///////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// uncomment the below to override spdlog's default eol
 | 
			
		||||
// #define SPDLOG_EOL "\n"
 | 
			
		||||
///////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user