87 long int size(
void)
const;
93 const bool& clobber =
false);
95 void flush(
const bool& force =
false);
96 void date(
const bool& flag);
97 void cout(
const bool& flag);
98 void cerr(
const bool& flag);
103 void header0(
const std::string& arg);
104 void header1(
const std::string& arg);
105 void header2(
const std::string& arg);
106 void header3(
const std::string& arg);
107 const bool&
date(
void)
const;
108 const bool&
cout(
void)
const;
109 const bool&
cerr(
void)
const;
110 const std::string&
name(
void)
const;
112 const int&
indent(
void)
const;
115 const std::string&
buffer(
void)
const;
122 void header(
const std::string& arg,
int level);
123 std::string
prefix(
void)
const;
124 void append(
const std::string&
string);
186 return (
size() == 0);
const bool & date(void) const
Return date flag.
const GFilename & filename(void) const
Return log filename.
void open(const GFilename &filename, const bool &clobber=false)
Open log file.
void header1(const std::string &arg)
Write string as header framed by '=' characters into logger.
const GChatter & chatter(void) const
Return chattiness.
void header2(const std::string &arg)
Write string as header framed by '-' characters into logger.
GLog & operator=(const GLog &log)
Assignment operator.
bool is_open(void) const
Signal that log file is open.
void free_members(void)
Delete class members.
int m_indent
Indentation of text.
long int m_written_size
Number of char's written though this logger.
void header3(const std::string &arg)
Write string as header enclosed by '===' into logger.
const bool & cout(void) const
Return standard output stream (cout) flag.
int m_max_length
Maximum buffer length.
const std::string & name(void) const
Return prefix name.
const int & buffer_size(void) const
Return the buffer size.
Information logger interface definition.
std::string m_buffer
Output string buffer.
bool is_empty(void) const
Signal if log file is empty.
const bool & cerr(void) const
Return standard error stream (cerr) flag.
std::string classname(void) const
Return class name.
void header(const std::string &arg, int level)
Write string as header into logger.
void copy_members(const GLog &log)
Copy class members.
GVector log(const GVector &vector)
Computes natural logarithm of vector elements.
void close(void)
Close log file.
void flush(const bool &force=false)
Flush string buffer into log file.
long int size(void) const
Return the number of characters in the log file.
void operator()(const char *msgFormat,...)
Message logging operator.
void append(const std::string &string)
Append string to the buffer.
bool m_linestart
Signals that buffer is at line start.
const int & indent(void) const
Return indentation.
virtual ~GLog(void)
Destructor.
GLog & operator<<(GLog &log)
Insert logger into logger.
void init_members(void)
Initialise class members.
std::string m_name
Name for prefix.
FILE * m_file
Log file pointer.
Definition of GammaLib typemaps.
const std::string & buffer(void) const
Return logger buffer.
bool m_use_date
Dump date in prefix.
long int written_size(void) const
Return number of characters written through this logger.
GChatter m_chatter
Chattiness for print() method.
bool m_stderr
Dump in standard error.
std::string prefix(void) const
Return prefix.
bool m_stdout
Dump in standard output.
GFilename m_filename
Log file name.
Filename class interface definition.
GLog(void)
Void constructor.
void header0(const std::string &arg)
Write string as centred header into logger.
void clear(void)
Clear object.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.