Curt Arnold wrote:
On Dec 21, 2004, at 5:34 PM, Tommi M�kitalo wrote:
I think it would be better to derive logstream from ostream or do not derive at all. I removed the base-class and the example-program works now. Here is my patch.

I had originally implemented this based on std::basic_ostream<logchar> but that was many times more expensive than the traditional log4cxx API calls when calls were below the threshold.

Note that at least on my system this change actually didn't produce that significant of a performance improvement. Given that the requirements on derived classes isn't defined in the language standard, perhaps it's not worth the portability problems.


If it isn't derived from std::ios_base, then manipulators like std::width etc can't be applied.

Actually, I believe my delegation based approach to doing logger streams did work just fine with IO maniplulators. It did ignore them if the stream wasn't enabled just like everything else (which I think is probably the right thing to do), but even that could be changed with some template specializations for manipulators.


--Chris

Reply via email to