Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Log_Record Class Reference

Defines the structure of an ACE logging record. More...

`#include <Log_Record.h>`

List of all members.

## Public Types
enum | { MAXLOGMSGLEN = ACE_MAXLOGMSGLEN, ALIGN_WORDB = 8, VERBOSE_LEN = 128, MAXVERBOSELOGMSGLEN = VERBOSE_LEN + MAXLOGMSGLEN }
## Public Methods
| ACE_Log_Record (void)
| ACE_Log_Record (ACE_Log_Priority lp, long time_stamp, long pid)
| ACE_Log_Record (ACE_Log_Priority lp, const ACE_Time_Value &time_stamp, long pid)
| ~ACE_Log_Record (void)
| Default dtor. More...
int | print (const ACE_TCHAR host_name[], u_long verbose_flag, FILE *fp=stderr)
| Write the contents of the logging record to the appropriate <FILE>. More...
int | print (const ACE_TCHAR host_name[], u_long verbose_flag, ostream &stream)
| Write the contents of the logging record to the appropriate <ostream>. More...
int | format_msg (const ACE_TCHAR host_name[], u_long verbose_flag, ACE_TCHAR *verbose_msg)
void | encode (void)
| Encode the <Log_Record> for transmission on the network. More...
void | decode (void)
| Decode the <Log_Record> received from the network. More...
long | type (void) const
| Get the type of the <Log_Record>. More...
void | type (long)
| Set the type of the <Log_Record>. More...
u_long | priority (void) const
void | priority (u_long num)
| Set the priority of the <Log_Record> <type_> (which must be a power of 2, as defined by the enums in <ACE_Log_Priority>). More...
long | length (void) const
| Get the length of the <Log_Record>. More...
void | length (long)
| Set the length of the <Log_Record>. More...
ACE_Time_Value | time_stamp (void) const
| Get the time stamp of the <Log_Record>. More...
void | time_stamp (const ACE_Time_Value &)
| Set the time stamp of the <Log_Record>. More...
long | pid (void) const
| Get the process id of the <Log_Record>. More...
void | pid (long)
| Set the process id of the <Log_Record>. More...
const ACE_TCHAR * | msg_data (void) const
| Get the message data of the <Log_Record>. More...
void | msg_data (const ACE_TCHAR *data)
| Set the message data of the <Log_Record>. More...
size_t | msg_data_len (void) const
| Get the size of the message data of the <Log_Record>, including a byte for the NUL. More...
void | dump (void) const
| Dump the state of an object. More...
## Static Public Methods
const ACE_TCHAR * | priority_name (ACE_Log_Priority p)
void | priority_name (ACE_Log_Priority p, const ACE_TCHAR *name)
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks. More...
## Private Methods
void | round_up (void)
| Round up to the alignment restrictions. More...
## Private Attributes
ACE_INT32 | length_
ACE_UINT32 | type_
| Type of logging record. More...
ACE_UINT32 | secs_
| Time that the logging record was generated. More...
ACE_UINT32 | usecs_
ACE_UINT32 | pid_
| Id of process that generated the logging record. More...
ACE_TCHAR | msg_data_ [MAXLOGMSGLEN+1]
| Logging record data. More...
## Static Private Attributes
const ACE_TCHAR * | priority_names_ []
| Symbolic names for the <ACE_Log_Priority> enums. More...

## Detailed Description

Defines the structure of an ACE logging record.

## Member Enumeration Documentation

anonymous enum

  | Enumeration values:
  MAXLOGMSGLEN | Maximum size of a logging message.
  ALIGN_WORDB | Most restrictive alignment.
  VERBOSE_LEN | Size used by verbose mode. 20 (date) + 15 (host_name) + 10 (pid) + 10 (type) + 4 (@) ... + ? (progname).
  MAXVERBOSELOGMSGLEN | Maximum size of a logging message with the verbose headers.

## Constructor & Destructor Documentation

ACE_Log_Record::ACE_Log_Record | ( | void |  | ) |

| Create a <Log_Record> and set its priority, time stamp, and process id. Create a <Log_Record> and set its priority, time stamp, and process id.

ACE_Log_Record::ACE_Log_Record | ( | ACE_Log_Priority | lp,
|  | long | ts_sec,
|  | long | p
| ) |

ACE_Log_Record::ACE_Log_Record | ( | ACE_Log_Priority | lp,
|  | const ACE_Time_Value & | ts,
|  | long | p
| ) |

ASYS_INLINE ACE_Log_Record::~ACE_Log_Record | ( | void |  | ) |

| Default dtor.

## Member Function Documentation

ASYS_INLINE void ACE_Log_Record::decode | ( | void |  | ) |

| Decode the <Log_Record> received from the network.

void ACE_Log_Record::dump | ( | void |  | ) | const

| Dump the state of an object.

ASYS_INLINE void ACE_Log_Record::encode | ( | void |  | ) |

| Encode the <Log_Record> for transmission on the network.

int ACE_Log_Record::format_msg | ( | const ACE_TCHAR | host_name[],
|  | u_long | verbose_flag,
|  | ACE_TCHAR * | verbose_msg
| ) |

ASYS_INLINE void ACE_Log_Record::length | ( | long | l | ) |

| Set the length of the <Log_Record>.

ASYS_INLINE long ACE_Log_Record::length | ( | void |  | ) | const

| Get the length of the <Log_Record>.

void ACE_Log_Record::msg_data | ( | const ACE_TCHAR * | data | ) |

| Set the message data of the <Log_Record>.

ASYS_INLINE const ACE_TCHAR * ACE_Log_Record::msg_data | ( | void |  | ) | const

| Get the message data of the <Log_Record>.

ASYS_INLINE size_t ACE_Log_Record::msg_data_len | ( | void |  | ) | const

| Get the size of the message data of the <Log_Record>, including a byte for the NUL.

ASYS_INLINE void ACE_Log_Record::pid | ( | long | p | ) |

| Set the process id of the <Log_Record>.

ASYS_INLINE long ACE_Log_Record::pid | ( | void |  | ) | const

| Get the process id of the <Log_Record>.

int ACE_Log_Record::print | ( | const ACE_TCHAR | host_name[],
|  | u_long | verbose_flag,
|  | ostream & | stream
| ) |

| Write the contents of the logging record to the appropriate <ostream>.

int ACE_Log_Record::print | ( | const ACE_TCHAR | host_name[],
|  | u_long | verbose_flag,
|  | FILE * | fp = stderr
| ) |

| Write the contents of the logging record to the appropriate <FILE>.

void ACE_Log_Record::priority | ( | u_long | p | ) |

| Set the priority of the <Log_Record> <type_> (which must be a power of 2, as defined by the enums in <ACE_Log_Priority>).

u_long ACE_Log_Record::priority | ( | void |  | ) | const

| Get the priority of the <Log_Record> <type_>. This is computed as the base 2 logarithm of <type_> (which must be a power of 2, as defined by the enums in <ACE_Log_Priority>).

void ACE_Log_Record::priority_name | ( | ACE_Log_Priority | p,
|  | const ACE_TCHAR * | name
| ) | `[static]`

const ACE_TCHAR * ACE_Log_Record::priority_name | ( | ACE_Log_Priority | p | ) | `[static]`

| Returns a character array with the string form of the <ACE_Log_Priority> parameter. This is used for the verbose printing format.

void ACE_Log_Record::round_up | ( | void |  | ) | `[private]`

| Round up to the alignment restrictions.

ASYS_INLINE void ACE_Log_Record::time_stamp | ( | const ACE_Time_Value & | ts | ) |

| Set the time stamp of the <Log_Record>.

ASYS_INLINE ACE_Time_Value ACE_Log_Record::time_stamp | ( | void |  | ) | const

| Get the time stamp of the <Log_Record>.

ASYS_INLINE void ACE_Log_Record::type | ( | long | t | ) |

| Set the type of the <Log_Record>.

ASYS_INLINE long ACE_Log_Record::type | ( | void |  | ) | const

| Get the type of the <Log_Record>.

## Member Data Documentation

ACE_Log_Record::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

ACE_INT32 ACE_Log_Record::length_`[private]`

| Total length of the logging record in bytes. This field *must* come first in order for various IPC framing mechanisms to work correctly. In addition, the field must be an ACE_INT32 in order to be passed portably across platforms.

ACE_TCHAR ACE_Log_Record::msg_data_[MAXLOGMSGLEN + 1]`[private]`

| Logging record data.

ACE_UINT32 ACE_Log_Record::pid_`[private]`

| Id of process that generated the logging record.

const ACE_TCHAR * ACE_Log_Record::priority_names_`[static, private]`

| Symbolic names for the <ACE_Log_Priority> enums.

ACE_UINT32 ACE_Log_Record::secs_`[private]`

| Time that the logging record was generated.

ACE_UINT32 ACE_Log_Record::type_`[private]`

| Type of logging record.

ACE_UINT32 ACE_Log_Record::usecs_`[private]`

The documentation for this class was generated from the following files:

- Log_Record.h
- Log_Record.cpp
- Log_Record.i