logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conway Allen" <Allen.Con...@atosorigin.com>
Subject getMessage, ostream, Level
Date Tue, 19 Oct 2004 15:24:41 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6487.1">
<TITLE>getMessage, ostream, Level</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Lucida Sans Unicode">A remark, a problem, a question - I
hope they haven't been brought up before (yes, I've looked)...</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Sans Unicode">1. Exception's getMessage is not declared
as const, yet it clearly is.</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Sans Unicode">2. If I write something like...</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2
FACE="Lucida Sans Unicode">#include &lt;iostream&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT
SIZE=2 FACE="Lucida Sans Unicode">using namespace std;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT
SIZE=2 FACE="Lucida Sans Unicode">#include &lt;logcxx/logger.h&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT
SIZE=2 FACE="Lucida Sans Unicode">#include &lt;logcxx/helpers/exception.h&gt;</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Sans Unicode">&nbsp; Then I try to use an ostream
as in</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2
FACE="Lucida Sans Unicode">ostream&amp; operator&lt;&lt;(ostream&amp;,
...)</FONT>
</P>

<P><FONT SIZE=2 FACE="Lucida Sans Unicode">&nbsp; I get compiler errors (expected
constructor, destructor.... before &amp; token)</FONT>

<BR><FONT SIZE=2 FACE="Lucida Sans Unicode">&nbsp; 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&lt;TCHAR&gt;. I don't know if that's the reason - perhaps not - but
the tchar.h is included in exception.h</FONT></P>

<P><FONT SIZE=2 FACE="Lucida Sans Unicode">3. In the documentation there's a phrase&nbsp;
&quot;<SPAN LANG="fr"><I></I></SPAN></FONT><SPAN LANG="fr"><I></I></SPAN><SPAN
LANG="fr"><I><FONT FACE="Times New Roman">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</FONT></I><FONT FACE="Times New Roman">&quot;.
Is there a later on?</FONT></SPAN></P>

<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Lucida Sans Unicode">Thanks...
Allen.</FONT></SPAN>
</P>

</BODY>
</HTML>

Mime
View raw message