bes
Updated for version 3.20.6
|
48 #define LOG(x) do { *(BESLog::TheLog()) << __FILE__ << ":" << __LINE__ << " - " << x ; BESLog::TheLog()->flush_me() ; } while( 0 )
49 #define VERBOSE(x) do { if (BESLog::TheLog()->is_verbose()) *(BESLog::TheLog()) << __FILE__ << ":" << __LINE__ << " - " << x ; BESLog::TheLog()->flush_me() ; } while( 0 )
51 #define LOG(x) do { *(BESLog::TheLog()) << x ; BESLog::TheLog()->flush_me() ; } while( 0 )
52 #define VERBOSE(x) do { if (BESLog::TheLog()->is_verbose()) *(BESLog::TheLog()) << x ; BESLog::TheLog()->flush_me() ; } while( 0 )
58 #define ERROR(x) LOG(x)
105 static BESLog * d_instance;
108 std::ofstream * d_file_buffer;
109 std::string d_file_name;
117 bool d_use_local_time;
127 const static std::string mark;
191 typedef std::ios& (*p_ios_manipulator)(std::ios&);
193 typedef std::ostream& (*p_ostream_manipulator)(std::ostream&);
209 virtual void dump(std::ostream &strm)
const;
211 virtual void flush_me();
218 std::ostream *get_log_ostream()
220 return d_file_buffer;
bool is_verbose()
Returns true if verbose logging is requested.
void verbose_off()
turns off verbose logging
virtual void dump(std::ostream &strm) const
dumps information about this object
BESLog & operator<<(std::string &)
Overloaded inserter that writes the specified string.
~BESLog()
Cleans up the logging mechanism.
void suspend()
Suspend logging of any information until resumed.
void resume()
Resumes logging after being suspended.
std::ostream &(* p_ostream_manipulator)(std::ostream &)
Defines a data type p_std::ostream_manipulator "pointer to function that takes std::ostream& and retu...
top level BES object to house generic methods
void verbose_on()
turn on verbose logging
std::ios &(* p_ios_manipulator)(std::ios &)
Defines a data type p_ios_manipulator "pointer to function that takes ios& and returns ios&".
Provides a mechanism for applications to log information to an external file.
BESLog()
constructor that sets up logging for the application.
void dump_time()
Protected method that dumps the date/time to the log file.