file_logger.h File Reference

#include "console_logger.h"
#include <basis/function.h>
#include <basis/log_base.h>

Include dependency graph for file_logger.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  file_logger
class  combo_logger
 combines a file_logger with a console logger (see console_logger.h). More...

Defines

#define SET_DEFAULT_FILE_LOGGER
 a macro that retasks the program-wide logger as a file_logger.
#define SET_DEFAULT_COMBO_LOGGER
 a macro that retasks the program-wide logger as a combo_logger.
#define SET_DEFAULT_COMBO_ERROR_LOGGER

Functions

istring LOGGERS_FUNCTION_STYLE app_name_for_file_logger ()
 returns a log file name for file_logger based on the program name.
log_base LOGGERS_FUNCTION_STYLE * set_PW_logger_for_file (const istring &file_name, int limit=file_logger::LOG_FILE_SIZE)
 retasks the program wide logger to use a new file_logger.
log_base LOGGERS_FUNCTION_STYLE * set_PW_logger_for_combo (const istring &file_name, int limit=file_logger::LOG_FILE_SIZE, bool standard_error=false)
 retasks the program wide logger to use a new combo_logger.


Define Documentation

#define SET_DEFAULT_COMBO_ERROR_LOGGER

Value:

Definition at line 185 of file file_logger.h.

#define SET_DEFAULT_COMBO_LOGGER

Value:

a macro that retasks the program-wide logger as a combo_logger.

Definition at line 181 of file file_logger.h.

Referenced by formal(), main(), program_wide_cleanup::program_wide_cleanup(), and service_root::service_root().

#define SET_DEFAULT_FILE_LOGGER

Value:

a macro that retasks the program-wide logger as a file_logger.

Definition at line 136 of file file_logger.h.


Function Documentation

istring LOGGERS_FUNCTION_STYLE app_name_for_file_logger (  ) 

returns a log file name for file_logger based on the program name.

for a program named myapp.exe, this will be in the form: {logging_dir}/myapp.log

Definition at line 53 of file file_logger.cpp.

References path_configuration::application_name(), path_configuration::make_logfile_name(), and filename::rootname().

log_base LOGGERS_FUNCTION_STYLE* set_PW_logger_for_combo ( const istring file_name,
int  limit = file_logger::LOG_FILE_SIZE,
bool  standard_error = false 
)

retasks the program wide logger to use a new combo_logger.

the original log_base object is returned and must be dealt with appropriately.

Definition at line 416 of file file_logger.cpp.

References retask_program_wide_logger().

log_base LOGGERS_FUNCTION_STYLE* set_PW_logger_for_file ( const istring file_name,
int  limit = file_logger::LOG_FILE_SIZE 
)

retasks the program wide logger to use a new file_logger.

the original log_base object is returned and must be dealt with appropriately.

Definition at line 60 of file file_logger.cpp.

References retask_program_wide_logger().


Generated on Fri Nov 28 04:30:08 2008 for HOOPLE Libraries by  doxygen 1.5.1