Skip to content

How to write a log file in text mode (rather than in binary mode)? #2634

Answered by tt4g
N-Dekker asked this question in Q&A
Discussion options

You must be logged in to vote

spdlog does not provide an option to change the file open mode.
You can open pull requests if you need such a feature.

It should be possible to add something like an SPDLOG_EOL macro that changes the newline character that spdlog adds to the end of a line.

///////////////////////////////////////////////////////////////////////////////
// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows)
//
// #define SPDLOG_EOL ";-)\n"
///////////////////////////////////////////////////////////////////////////////

// e…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@N-Dekker
Comment options

Answer selected by N-Dekker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants