summaryrefslogtreecommitdiff
path: root/ace/Logging_Strategy.h
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-11-01 22:17:39 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-11-01 22:17:39 +0000
commit4cdff4b3e2dbc73b00e671ef638d71d6d854e0ac (patch)
tree97236ece363cff48fd287c780db4290da39b02cb /ace/Logging_Strategy.h
parent7b6368ec78831d127f38eb7b630c21f98faf6a83 (diff)
downloadATCD-4cdff4b3e2dbc73b00e671ef638d71d6d854e0ac.tar.gz
ChangeLogTag:Wed Nov 1 14:11:48 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/Logging_Strategy.h')
-rw-r--r--ace/Logging_Strategy.h96
1 files changed, 48 insertions, 48 deletions
diff --git a/ace/Logging_Strategy.h b/ace/Logging_Strategy.h
index 0544ecf571a..d411fc7ef58 100644
--- a/ace/Logging_Strategy.h
+++ b/ace/Logging_Strategy.h
@@ -1,18 +1,15 @@
/* -*- C++ -*- */
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// ace
-//
-// = FILENAME
-// Logging_Strategy.h
-//
-// = AUTHOR
-// Prashant Jain <pjain@cs.wustl.edu>
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Logging_Strategy.h
+ *
+ * $Id$
+ *
+ * @author Prashant Jain <pjain@cs.wustl.edu>
+ */
+//=============================================================================
+
#ifndef ACE_LOGGING_STRATEGY_H
#define ACE_LOGGING_STRATEGY_H
@@ -28,72 +25,75 @@
#define ACE_DEFAULT_MAX_LOGFILE_SIZE 16384 /* KB */
#endif /* ACE_DEFAULT_MAX_LOGFILE_SIZE */
+/**
+ * @class ACE_Logging_Strategy
+ *
+ * @brief This class provides the hooks to control the output produced
+ * by any of the network services.
+ *
+ * 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 <sample_interval_in_secs> and -m
+ * <max_size_in_KB> options for the Logging_Strategy class in a
+ * svc.conf file.
+ */
class ACE_Export ACE_Logging_Strategy : public ACE_Service_Object
{
- // = TITLE
- // This class provides the hooks to control the output produced
- // by any of the network services.
- //
- // = DESCRIPTION
- // 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 <sample_interval_in_secs> and -m
- // <max_size_in_KB> options for the Logging_Strategy class in a
- // svc.conf file.
public:
+ /// Constructor.
ACE_Logging_Strategy (void);
- // Constructor.
+ /// Dynamic linking initialization hook.
virtual int init (int argc, ACE_TCHAR *argv[]);
- // Dynamic linking initialization hook.
+ /// Dynamic linking termination hook.
virtual int fini (void);
- // Dynamic linking termination hook.
+ /**
+ * 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.
+ */
virtual int handle_timeout (const ACE_Time_Value& tv, const void* arg);
- // 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.
+ /// Parse svc.conf arguments.
int parse_args (int argc, ACE_TCHAR *argv[]);
- // Parse svc.conf arguments.
private:
+ /// Tokenize to set all the flags
void tokenize (ACE_TCHAR *flag_string);
- // Tokenize to set all the flags
+ /// Tokenize to set priorities (either process or thread one).
void priorities (ACE_TCHAR *priority_string,
ACE_Log_Msg::MASK_TYPE mask);
- // Tokenize to set priorities (either process or thread one).
+ /// Current thread's priority mask set by <priorities>
u_long thread_priority_mask_;
- // Current thread's priority mask set by <priorities>
+ /// Process-wide priority mask set by <priorities>
u_long process_priority_mask_;
- // Process-wide priority mask set by <priorities>
+ /// Flags we keep track of.
u_long flags_;
- // Flags we keep track of.
+ /// File name we're logging to.
ACE_TCHAR *filename_;
- // File name we're logging to.
+ /// If non-0 then wipeout the logfile, otherwise append to it.
int wipeout_logfile_;
- // If non-0 then wipeout the logfile, otherwise append to it.
+ /// If non-zero, sampling interval (in secs) at which maximum logfile
+ /// size is checked, otherwise logfile size can grow indefinitely.
u_long interval_;
- // If non-zero, sampling interval (in secs) at which maximum logfile
- // size is checked, otherwise logfile size can grow indefinitely.
+ /// Maximum logfile size (in KB).
u_long max_size_;
- // Maximum logfile size (in KB).
};
ACE_FACTORY_DECLARE (ACE, ACE_Logging_Strategy)