logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: getMessage, ostream, Level
Date Tue, 19 Oct 2004 23:49:48 GMT

On Oct 19, 2004, at 10:24 AM, Conway Allen wrote:

> A remark, a problem, a question - I hope they haven't been brought up 
> before (yes, I've looked)...
>
> 1. Exception's getMessage is not declared as const, yet it clearly is.
>

Thanks, will check.

> 2. If I write something like...
>
>         #include <iostream>
>          using namespace std;
>          #include <logcxx/logger.h>
>         #include <logcxx/helpers/exception.h>
>
>   Then I try to use an ostream as in
>
>         ostream& operator<<(ostream&, ...)
>
>   I get compiler errors (expected constructor, destructor.... before & 
> token)
>    If I write std::ostream then the errors go away. I see that in 
> tchar.h there's a typedef defining ostream to be a 
> basic_ostream<TCHAR>. I don't know if that's the reason - perhaps not 
> - but the tchar.h is included in exception.h

STL stream classes are in the std namespace, unless there is a "using 
namespace std;" or the std:: prefix is used, it should cause a compiler 
error.  The pre-standard stream classes were not in a namespace.

tchar.h is a horror and will hopefully be gone by Halloween, but I 
don't think it is responsible.


>
> 3. In the documentation there's a phrase  "Although we do not 
> encourage you to do so, you may define your own levels by sub-classing 
> the Level class. A perhaps better approach will be explained later 
> on". Is there a later on?
>

Don't know, but there are unit tests that test user defined levels.


Mime
View raw message