
2 Apr
2007
2 Apr
'07
5:01 p.m.
AMDG JD <jean.daniel.michaud <at> gmail.com> writes:
Caleb Epstein: * Messages which won't be logged shouldn't even go through the formatting step. I'm pretty sure this cannot be done in a single call w/o macros though.
I don't see why this wouldn't work: std::string x, y; //... logger << lazy(lambda::var(x) + ":" + y, _level = 2); If you need a compile-time switch: logger << lazy(lambda::var(x) + ":" + y, _level = mpl::int_<2>()); if you want to shut off all logging: struct logger { template<class T> logger& operator<<(const T&) {} }; In Christ, Steven Watanabe