18 #ifndef _LOG4CXX_STREAM_H 19 #define _LOG4CXX_STREAM_H 55 void insert(std::ios_base & (*manip)(std::ios_base&));
69 int precision(
int newval);
74 int width(
int newval);
87 std::ios_base::fmtflags flags(std::ios_base::fmtflags newflags);
91 std::ios_base::fmtflags setf(std::ios_base::fmtflags newflags, std::ios_base::fmtflags mask);
95 std::ios_base::fmtflags setf(std::ios_base::fmtflags newflags);
119 void setLevel(
const LevelPtr& level);
132 bool isEnabledFor(
const LevelPtr& level)
const;
146 bool set_stream_state(std::ios_base& os,
int& fillchar);
158 virtual void erase() = 0;
164 virtual void get_stream_state(std::ios_base& base,
167 bool& fillSet)
const = 0;
168 virtual void refresh_stream_state() = 0;
183 class LOG4CXX_EXPORT logstream_ios_base :
public std::ios_base
186 logstream_ios_base(std::ios_base::fmtflags initval,
188 } initset, initclear;
245 logstream(
const std::basic_string<Ch>& loggerName,
278 operator std::basic_ostream<Ch>& ();
280 #if !(LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE) 290 ((std::basic_ostream<char>&) *
this) << val;
303 virtual void erase();
305 virtual void get_stream_state(std::ios_base& base,
308 bool& fillSet)
const;
309 virtual void refresh_stream_state();
315 std::basic_stringstream<Ch>* stream;
319 #if LOG4CXX_WCHAR_T_API 348 wlogstream(
const std::basic_string<Ch>& loggerName,
382 operator std::basic_ostream<Ch>& ();
384 #if !(LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE) 394 ((std::basic_ostream<wchar_t>&) *
this) << val;
406 virtual void erase();
408 virtual void get_stream_state(std::ios_base& base,
411 bool& fillSet)
const;
412 virtual void refresh_stream_state();
418 std::basic_stringstream<Ch>* stream;
423 #if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API 443 #if LOG4CXX_UNICHAR_API 453 ulogstream(
const std::basic_string<Ch>& loggerName,
457 #if LOG4CXX_CFSTRING_API 493 operator std::basic_ostream<Ch>& ();
495 #if !(LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE) 505 ((std::basic_ostream<Ch>&) *
this) << val;
517 virtual void erase();
519 virtual void get_stream_state(std::ios_base& base,
522 bool& fillSet)
const;
523 virtual void refresh_stream_state();
529 std::basic_stringstream<Ch>* stream;
538 #if LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE 554 ((std::basic_ostream<char>&) os) << val;
560 #if LOG4CXX_WCHAR_T_API 570 ((std::basic_ostream<wchar_t>&) os) << val;
578 #if !defined(LOG4CXX_ENDMSG) 579 #if LOG4CXX_LOGSTREAM_ADD_NOP 580 #define LOG4CXX_ENDMSG (log4cxx::logstream_manipulator) log4cxx::logstream_base::nop >> LOG4CXX_LOCATION << (log4cxx::logstream_manipulator) log4cxx::logstream_base::endmsg 582 #define LOG4CXX_ENDMSG LOG4CXX_LOCATION << (log4cxx::logstream_manipulator) log4cxx::logstream_base::endmsg 587 #endif //_LOG4CXX_STREAM_H logstream_base &(* logstream_manipulator)(logstream_base &)
Definition: stream.h:215
log4cxx::logstream & operator<<(const V &val)
Template to allow any class with an std::basic_ostream inserter to be applied to this class...
Definition: stream.h:286
An STL-like stream API for log4cxx using char as the character type.
Definition: stream.h:226
std::shared_ptr< Level > LevelPtr
Definition: optionconverter.h:27
unsigned short UniChar
Definition: logstring.h:44
log4cxx::wlogstream & operator<<(const V &val)
Template to allow any class with an std::basic_ostream inserter to be applied to this class...
Definition: stream.h:390
Base class for the basic_logstream template which attempts to emulate std::basic_ostream but attempts...
Definition: stream.h:37
const struct __CFString * CFStringRef
Definition: logstring.h:36
std::basic_ostream< char > & operator<<(CharMessageBuffer &os, const V &val)
Definition: messagebuffer.h:199
An STL-like stream API for log4cxx using wchar_t as the character type.
Definition: stream.h:329
An STL-like stream API for log4cxx using UniChar as the character type.
Definition: stream.h:433
ulogstream & operator<<(const V &val)
Template to allow any class with an std::basic_ostream inserter to be applied to this class...
Definition: stream.h:501
This class represents the location of a logging statement.
Definition: locationinfo.h:33
#define LOG4CXX_UNLIKELY(expr)
Provides optimization hint to the compiler to optimize for the expression being false.
Definition: logger.h:1756
std::shared_ptr< Logger > LoggerPtr
Definition: defaultloggerfactory.h:26
Definition: appender.h:32
bool isEnabled() const
Returns true if the current level is the same or high as the level of logger at time of construction ...
Definition: stream.h:124