ACE_Logging_Strategy Class ReferenceThis class provides a way to dynamically configure the ACE logging mechanism at run time as well as enable the mechanisms for limiting log file size and log file backup/rotation capability. More...
Inheritance diagram for ACE_Logging_Strategy:
![]()
Collaboration diagram for ACE_Logging_Strategy:
![]()
Detailed DescriptionThis class provides a way to dynamically configure the ACE logging mechanism at run time as well as enable the mechanisms for limiting log file size and log file backup/rotation capability.Depending upon when this service is invoked and with what flags, the output of other network services can be controlled. The output can be streamed to stderr, to a file, to a logging daemon, or it can be set to be "silent". If logging records are output to a file, the file can be set to a maximum size and repeatedly split into new files. The log file size can be limited at any logging point (i.e., application, client logging daemon, or server logging daemon) by specifying the -i
By using the -o option we can also choose the mode of organization of the files, e.g., the first one is the normal used in Unix systems (when cron rotates the logs it keeps the lowest number the most recent one), the second is for increasing speed (we only create a new log file, and don't rotate the others (fewer accesses to disk)).
By default, the ACE_Reactor my_reactor; ACE_Logging_Strategy *logging_strategy = ...... // Get instance. logging_strategy->reactor (&my_reactor);
and then logging_strategy will use your reactor. If you're dynamically linking the Constructor & Destructor Documentation
Constructor.
Destructor.
Member Function Documentation
Timeout handler which tests logfile size. If the current logfile size exceeds <max_size_>, the current logfile is closed, saved to logfile.old, and a new logfile is reopened. Reimplemented from ACE_Event_Handler.
Parse arguments provided in svc.conf file.
Tokenize to set all the flags.
Tokenize to set priorities (either process or thread one).
Member Data Documentation
Current thread's priority mask set by <priorities>.
Process-wide priority mask set by <priorities>.
Flags we keep track of.
File name we're logging to.
Logger key for distributed logging.
Program name to be used for n format specifier.
If non-0 then wipeout the logfile, otherwise append to it. Default value is 0.
If non-0 we have a maximum number of log files we can write. Default value is 0, i.e., no maximum number.
If non-0 we order the files as we rotate them. Default value is 0, i.e., we do not rotate files by default.
This tells us in what file we last wrote. It will be increased to enable multiple log files
Tells us what is the maximum log file to write. We will write <max_file_number_> + 1 files (includes the current log file). Default value is 1, i.e., 2 files by default.
If non-zero, sampling interval (in secs) at which maximum logfile size is checked, otherwise logfile size can grow indefinitely. Default value is 0.
Maximum logfile size (in KB). Default value is <ACE_DEFAULT_MAX_LOGFILE_SIZE>.
ACE_Log_Msg instance to work with.
The documentation for this class was generated from the following files: Generated on Mon Sep 15 07:15:30 2008 for ACE by ![]() |