#include <ace/Log_Msg.h> class ACE_Log_Msg {
public:
SILENT = 020 }; static ACE_Log_Msg *instance (void);
ACE_Log_Msg (void);
int open ( const char *prog_name, u_long options_flags = ACE_Log_Msg::STDERR, const char *logger_key = 0 );
void set_flags (u_long f);
void clr_flags (u_long f);
u_long flags (void);
int acquire (void);
int release (void);
void sync (const char *program_name);
void op_status (int status);
int op_status (void);
void errnum (int);
int errnum (void);
void linenum (int);
int linenum (void);
void file (const char *);
const char *file (void);
void msg (char *);
char *msg (void);
void restart (int);
int restart (void);
void msg_ostream (ostream *);
ostream *msg_ostream (void);
int inc (void);
int dec (void);
int trace_active (void);
void trace_active (int value);
ACE_Thread_State *thr_state (void);
void thr_state (ACE_Thread_State *);
ACE_hthread_t *thr_handle (void);
void thr_handle (ACE_hthread_t *);
void stop_tracing (void);
void start_tracing (void);
int tracing_enabled (void);
u_long priority_mask (void);
u_long priority_mask (u_long);
pid_t getpid (void) const;
const char *local_host (void) const;
void local_host (const char *);
void set ( const char *file, int line, int op_status = -1, int errnum = 0, int restart = 1, ostream *os = 0 );
ssize_t log (ACE_Log_Priority priority, const char *format, ...);
ssize_t log ( const char *format, ACE_Log_Priority priority, va_list argp );
int log_hexdump ( ACE_Log_Priority log_priority, char *buffer, int size );
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
private:
int status_;
int errnum_;
int linenum_;
char file_[MAXNAMELEN];
char msg_[ACE_Log_Record::MAXLOGMSGLEN];
int restart_;
ostream *ostream_;
int trace_depth_;
int trace_active_;
int tracing_enabled_;
ACE_Thread_State *thr_state_;
ACE_hthread_t *thr_handle_;
u_long priority_mask_;
static const char *program_name_;
static const char *local_host_;
static pid_t pid_;
static u_long flags_;
static int msg_off_;
};
void set_flags (u_long f);
void clr_flags (u_long f);
u_long flags (void);
int acquire (void);
int release (void);
void sync (const char *program_name);
void op_status (int status);
int op_status (void);
void errnum (int);
int errnum (void);
void linenum (int);
int linenum (void);
void file (const char *);
const char *file (void);
void msg (char *);
char *msg (void);
void restart (int);
int restart (void);
void msg_ostream (ostream *);
ostream *msg_ostream (void);
int inc (void);
int dec (void);
int trace_active (void);
void trace_active (int value);
ACE_Thread_State *thr_state (void);
void thr_state (ACE_Thread_State *);
ACE_hthread_t *thr_handle (void);
void thr_handle (ACE_hthread_t *);
void stop_tracing (void);
void start_tracing (void);
int tracing_enabled (void);
u_long priority_mask (void);
ACE_Log_Priority
mask.
u_long priority_mask (u_long);
ACE_Log_Priority
mask, returns original mask.
pid_t getpid (void) const;
const char *local_host (void) const;
void local_host (const char *);
void set (
const char *file,
int line,
int op_status = -1,
int errnum = 0,
int restart = 1,
ostream *os = 0
);
ssize_t log (ACE_Log_Priority priority, const char *format, ...);
unknown
" if not set)
'o': print as an octal number
'P': print out the current process id
'p': print out the appropriate errno value from sys_errlist
'r': call the function pointed to by the corresponding argument
'R': print return status
'S': print out the appropriate _sys_siglist entry corresponding to var-argument.
's': print out a character string
'T': print timestamp in hour:minute:sec:usec format.
't': print thread id (1 if single-threaded)
'u': print as unsigned int
'X', 'x': print as a hex number
'%': print out a single percent sign, '%'
ssize_t log (
const char *format,
ACE_Log_Priority priority,
va_list argp
);
int log_hexdump (
ACE_Log_Priority log_priority,
char *buffer,
int size
);
log
to do the actual print, but formats first to make the chars
printable.
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
static const char *program_name_;
static const char *local_host_;
static pid_t pid_;
static u_long flags_;
static int msg_off_;