removed getStream() (useless)
This commit is contained in:
parent
c91537f01d
commit
92af63f151
@ -5,10 +5,13 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: LogSink.h,v 1.3 2005/02/04 08:11:54 cozman Exp $
|
||||
// $Id: LogSink.h,v 1.4 2005/02/05 03:01:03 cozman Exp $
|
||||
//
|
||||
// Revisions:
|
||||
// $Log: LogSink.h,v $
|
||||
// Revision 1.4 2005/02/05 03:01:03 cozman
|
||||
// removed getStream() (useless)
|
||||
//
|
||||
// Revision 1.3 2005/02/04 08:11:54 cozman
|
||||
// switched Log to shared_ptrs and added extra flushes
|
||||
//
|
||||
@ -102,8 +105,6 @@ public:
|
||||
// Name of the LogSink.
|
||||
std::string getName() const;
|
||||
|
||||
virtual std::ostream& getStream()=0;
|
||||
|
||||
private:
|
||||
std::string name_;
|
||||
|
||||
@ -132,7 +133,6 @@ public:
|
||||
virtual ~ConsoleSink();
|
||||
|
||||
virtual void writeMessage(LogLevel level, std::string msg);
|
||||
virtual std::ostream& getStream();
|
||||
};
|
||||
|
||||
// Class: TextSink
|
||||
@ -150,7 +150,6 @@ public:
|
||||
virtual ~TextSink();
|
||||
|
||||
virtual void writeMessage(LogLevel level, std::string msg);
|
||||
virtual std::ostream& getStream();
|
||||
private:
|
||||
std::ofstream out_;
|
||||
};
|
||||
@ -170,7 +169,6 @@ public:
|
||||
virtual ~HTMLSink();
|
||||
|
||||
virtual void writeMessage(LogLevel level, std::string msg);
|
||||
virtual std::ostream& getStream();
|
||||
private:
|
||||
std::ofstream out_;
|
||||
};
|
||||
|
@ -5,10 +5,13 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: LogSink.cpp,v 1.3 2005/02/04 08:11:54 cozman Exp $
|
||||
// $Id: LogSink.cpp,v 1.4 2005/02/05 03:01:04 cozman Exp $
|
||||
//
|
||||
// Revisions:
|
||||
// $Log: LogSink.cpp,v $
|
||||
// Revision 1.4 2005/02/05 03:01:04 cozman
|
||||
// removed getStream() (useless)
|
||||
//
|
||||
// Revision 1.3 2005/02/04 08:11:54 cozman
|
||||
// switched Log to shared_ptrs and added extra flushes
|
||||
//
|
||||
@ -65,11 +68,6 @@ void ConsoleSink::writeMessage(LogLevel level, std::string msg)
|
||||
std::cerr << pre[static_cast<int>(level)] << msg << std::endl;
|
||||
}
|
||||
|
||||
std::ostream& ConsoleSink::getStream()
|
||||
{
|
||||
return std::cerr;
|
||||
}
|
||||
|
||||
//TextSink
|
||||
|
||||
TextSink::TextSink(std::string name) :
|
||||
@ -94,11 +92,6 @@ void TextSink::writeMessage(LogLevel level, std::string msg)
|
||||
out_ << pre[static_cast<int>(level)] << msg << std::endl;
|
||||
}
|
||||
|
||||
std::ostream& TextSink::getStream()
|
||||
{
|
||||
return out_;
|
||||
}
|
||||
|
||||
//HTMLSink
|
||||
|
||||
HTMLSink::HTMLSink(std::string name) :
|
||||
@ -138,9 +131,4 @@ void HTMLSink::writeMessage(LogLevel level, std::string msg)
|
||||
<< pre[static_cast<int>(level)] << msg << "</p>" << std::endl;
|
||||
}
|
||||
|
||||
std::ostream& HTMLSink::getStream()
|
||||
{
|
||||
return out_;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user