
From: John Torjo [mailto:john.lists@torjo.com] I really don't understand why you'd want this. And more to the point, I'm really curious how you could implement this in C++:
// show what you want above. BOOST_LOG(app) << "result of f() " << f();
And finally, I don't know why you'd want the above. What if f() then calls g(), and so on, all this functions doing some logging. Would you actually prefer:
a.cpp:14: result of f() [100 lines of other logged messages] a.cpp:14: 1234
To:
[100 lines of other logged messages] a.cpp:14: result of f(): 1234
Best, John
I'd like to add use case. I think that log messages should be written as soon as possible. Use case: program crash only on specific machine that you can't debug on. If logs messages will not be written immediately they will be lost. In this case this logger is pretty useless. I think that if someone prefer to see
a.cpp:14: result of f() [100 lines of other logged messages] a.cpp:14: 1234
he should wrote "log viewer" that will handle this. Roman