20 #ifndef BEAST_UTILITY_JOURNAL_H_INCLUDED
21 #define BEAST_UTILITY_JOURNAL_H_INCLUDED
29 namespace severities {
120 #ifndef __INTELLISENSE__
149 template <
typename T>
168 template <
typename T>
178 #ifndef __INTELLISENSE__
242 explicit operator bool()
const
253 template <
typename T>
263 #ifndef __INTELLISENSE__
346 #ifndef __INTELLISENSE__
357 template <
typename T>
364 template <
typename T>
374 template <
typename T>
383 template <
class CharT,
class Traits = std::
char_traits<CharT>>
390 write(T
const*) =
delete;
419 write(this->str().c_str());
427 template <
class CharT,
class Traits = std::
char_traits<CharT>>
440 :
std::basic_ostream<CharT, Traits>(&buf_), buf_(strm)
Abstraction for the underlying message destination.
Stream(Stream const &other)
Construct or copy another Stream.
Sink & operator=(Sink const &lhs)=delete
Stream trace() const
Severity stream access functions.
std::ostringstream m_ostream
ScopedStream(ScopedStream const &other)
Severity level() const
Returns the Severity level of messages this Stream reports.
static Sink & getNullSink()
Returns a Sink which does nothing.
Journal(Sink &sink)
Create a journal that writes to the specified sink.
Sink & sink() const
Returns the Sink that this Stream writes to.
ScopedStream operator<<(std::ostream &manip(std::ostream &)) const
Output stream support.
Stream()
Create a stream which produces no output.
void write(char const *s)
std::ostream & operator<<(std::ostream &manip(std::ostream &)) const
Sink & sink() const
Returns the Sink associated with this Journal.
bool active(Severity level) const
Returns true if any message would be logged at this severity level.
virtual bool active(Severity level) const
Returns true if text at the passed severity produces output.
Stream stream(Severity level) const
Returns a stream for this sink, with the specified severity level.
virtual bool console() const
Returns true if a message is also written to the Output Window (MSVC).
Provide a light-weight way to check active() before string formatting.
A generic endpoint for log messages.
Journal()=delete
Journal has no default constructor.
bool active() const
Returns true if sink logs anything at this stream's level.
traits_type::pos_type pos_type
Stream(Sink &sink, Severity level)
Create a stream that writes at the given level.
detail::logstream_buf< CharT, Traits > buf_
traits_type::off_type off_type
virtual Severity threshold() const
Returns the minimum severity level this sink will report.
Severity
Severity level / threshold of a Journal message.
ScopedStream & operator=(ScopedStream const &)=delete
void write(wchar_t const *s)
basic_logstream(beast::Journal::Stream const &strm)
traits_type::int_type int_type
Stream & operator=(Stream const &other)=delete
logstream_buf(beast::Journal::Stream const &strm)
beast::Journal::Stream strm_
virtual void write(Severity level, std::string const &text)=0
Write text to the sink at the specified severity.
std::ostringstream & ostream() const