Skip to content

Mixing ostreams to different TPIE log levels #30

Mortal opened this Issue Oct 12, 2012 · 2 comments

3 participants

Mortal commented Oct 12, 2012

With log level set to LOG_INFO, I expect the following code to output two lines of logging, "Info log" twice.

However, "Info log" is only output once.

std::ostream & os = log_info();
os << "Info log" << std::endl;
std::ostream & os2 = log_debug();
os2 << "Debug log" << std::endl;
os << "Info log" << std::endl;
@Mortal Mortal was assigned Oct 12, 2012

Hmm. That does indeed make sense to expect that. Underlying we of cause only have one log stream, and log_info() is just magic for getting that log stream and changing thats priority to info, but I guess this is not that intuitive. If there is not any code in tpie/ts thats make use of the fact that there is only one log stream, then I am all in favure of having several different ones.


This issue has been fixed with the merge of the log branch(a2df975).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.