NAME
ACE_Log_Record -
Defines the structure of an ACE logging record.
SYNOPSIS
#include <ace/Log_Record.h>
class ACE_Log_Record
{
public:
friend ostream &operator << (ostream &, ACE_Log_Record &);
enum { MAXLOGMSGLEN = BUFSIZ * 4,
ALIGN_WORDB = 8,
VERBOSE_LEN = 128 };
ACE_Log_Record (void);
ACE_Log_Record (ACE_Log_Priority lp, long time_stamp, long pid);
int print (
const char host_name[],
int verbose = 1,
FILE *fp = stderr,
size_t msg_data_len = 0
);
int print (
const char host_name[],
int verbose,
ostream &stream,
size_t msg_data_len = 0
);
void encode (void);
void decode (void);
long type (void) const;
void type (long);
long length (void) const;
void length (long);
long time_stamp (void) const;
void time_stamp (long);
long pid (void) const;
void pid (long);
char *msg_data (void);
void msg_data (const char *data);
void msg_data_len (size_t len);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
private:
void round_up (void);
long type_;
long length_;
long time_stamp_;
long pid_;
char msg_data_[MAXLOGMSGLEN];
};
Initialization
ACE_Log_Record (void);
ACE_Log_Record (ACE_Log_Priority lp, long time_stamp, long pid);
Create a Log_Record and set its priority, time stamp, and
process id.
int print (
const char host_name[],
int verbose = 1,
FILE *fp = stderr,
size_t msg_data_len = 0
);
Write the contents of the logging record to the appropriate
FILE.
int print (
const char host_name[],
int verbose,
ostream &stream,
size_t msg_data_len = 0
);
Write the contents of the logging record to the appropriate
ostream.
Marshall/demarshall
void encode (void);
Encode the Log_Record for transmission on the network.
void decode (void);
Decode the Log_Record received from the network.
Set/get methods
long type (void) const;
Get the type of the Log_Record.
void type (long);
Set the type of the Log_Record.
long length (void) const;
Get the length of the Log_Record.
void length (long);
Set the length of the Log_Record.
long time_stamp (void) const;
Get the time stamp of the Log_Record.
void time_stamp (long);
Set the time stamp of the Log_Record.
long pid (void) const;
Get the process id of the Log_Record.
void pid (long);
Set the process id of the Log_Record.
char *msg_data (void);
Get the message data of the Log_Record.
void msg_data (const char *data);
Set the message data of the Log_Record.
void msg_data_len (size_t len);
Set the size of the message data of the Log_Record.
void dump (void) const;
Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
Declare the dynamic allocation hooks.
AUTHOR
Doug Schmidt
LIBRARY
ace