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;
virtual void dump(std::ostream &strm) const
dumps information about this object
~BESLog()
Cleans up the logging mechanism.
BESLog & operator<<(std::string &)
Overloaded inserter that writes the specified string.
void verbose_off()
turns off verbose logging
bool is_verbose()
Returns true if verbose logging is requested.
void resume()
Resumes logging after being suspended.
Base object for bes objects.
void suspend()
Suspend logging of any information until resumed.
void verbose_on()
turn on verbose logging
std::ostream &(* p_ostream_manipulator)(std::ostream &)
Defines a data type p_std::ostream_manipulator "pointer to function that takes std::ostream& and retu...
void dump_time()
Protected method that dumps the date/time to the log file.
BESLog()
constructor that sets up logging for the application.
Provides a mechanism for applications to log information to an external file.
std::ios &(* p_ios_manipulator)(std::ios &)
Defines a data type p_ios_manipulator "pointer to function that takes ios& and returns ios&".