* to #cerr#, but can be set to another
* stream through the constructor.
*/
- ostream &std;
+ ostream *std;
/**
* Pointer to a stream, where a copy of
* Declare this function as a friend.
*/
friend void endl (LogStream &);
+
+ /**
+ * Kludge to make one of the egcs snapshots
+ * happy, since it produces an internal
+ * compiler error when accessing #s.std#.
+ * Remove this function at the first
+ * possible time.
+ */
+ ostream & get_std_stream () {
+ return *std;
+ };
+
};
// print the object #t# to each of the
// two streams, if necessary
if (s.prefixes.size() <= s.std_depth)
- s.std << t;
+ s.get_std_stream() << t;
if (s.file && (s.prefixes.size() <= s.file_depth))
*(s.file) << t;
/* end of #ifndef __logstream_H */
#endif
/*---------------------------- logstream.h ---------------------------*/
+
LogStream::LogStream()
- : std(cerr), file(0), was_endl(true),
+ : std(&cerr), file(0), was_endl(true),
std_depth(10000), file_depth(10000)
{
prefixes.push("DEAL:");