This class provides a container for a fixed set of attributes appropriate for logging. For each attribute in this class (e.g., category), there is an accessor for obtaining the attribute's value (the category accessor) and a manipulator for changing the attribute's value (the setCategory manipulator).
Declared in <ball_recordattributes.h>
class RecordAttributes;
Additionally, this class supports a complete set of value semantic operations, including copy construction, assignment and equality comparison, and ostream printing. A precise operational definition of when two instances have the same value can be found in the description of operator== for the class. This class is exception neutral with no guarantee of rollback: If an exception is thrown during the invocation of a method on a pre-existing instance, the object is left in a valid state, but its value is undefined. In no event is memory leaked. Finally, aliasing (e.g., using all or part of an object as both source and destination) is supported in all cases.
| Name | Description |
|---|---|
RecordAttributes [constructor] | Constructors |
operator= | Assign to this record attributes object the value of the specified rhs record attributes object. Resets the objects returned by the messageStreamBuf and messageStream methods. |
category | Return the category attribute of this record attributes object. |
clearMessage | Set the message attribute of this record attributes object to the empty string. Resets the objects returned by the messageStreamBuf and messageStream methods. |
fileName | Return the filename attribute of this record attributes object. |
kernelThreadID | Return the kernelThreadID attribute of this record attributes object. |
lineNumber | Return the line number attribute of this record attributes object. |
message | Return the message attribute of this record attributes object. Note that this method will return a truncated message if it contains embedded null ('0') characters; see messageRef for an alternative to this method. Warning: This method is not const thread-safe, and cannot be safely called concurrently. It may modify the stream buffer returned by messageStreamBuf. |
messageRef | Return a string reference providing non-modifiable access to the message attribute of this record attributes object. Note that the returned string reference is not null-terminated, and may contain null ('0') characters. |
messageStream | messageStream overloads |
messageStreamBuf | messageStreamBuf overloads |
print | Format this object to the specified output stream at the optionally specified indentation level and return a reference to the modifiable stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. Each line is indented by the absolute value of level * spacesPerLevel. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, suppress line breaks and format the entire output on one line. If stream is initially invalid, this operation has no effect. |
processID | Return the processID attribute of this record attributes object. |
setCategory | Set the category attribute of this record attributes object to the specified category. |
setFileName | Set the filename attribute of this record attributes object to the specified fileName. |
setKernelThreadID | Set the kernelThreadID attribute of this record attributes object to the specified kernelThreadID. |
setLineNumber | Set the line number attribute of this record attributes object to the specified lineNumber. |
setMessage | Set the message attribute of this record attributes object to the specified message. Resets the objects returned by the messageStreamBuf and messageStream methods. |
setProcessID | Set the processID attribute of this record attributes object to the specified processID. |
setSeverity | Set the severity attribute of this record attributes object to the specified severity. |
setThreadID | Set the threadID attribute of this record attributes object to the specified threadID. |
setTimestamp | Set the timestamp attribute of this record attributes object to the specified timestamp. |
severity | Return the severity attribute of this record attributes object. |
threadID | Return the threadID attribute of this record attributes object. |
timestamp | Return the timestamp attribute of this record attributes object. |
operator BloombergLP::bslmf::NestedTraitDeclaration<RecordAttributes, UsesBslmaAllocator> | Declare that this type uses a bslma allocator. |
| Name | Description |
|---|---|
BloombergLP::ball::operator== | Return true if the specified lhs and rhs record attributes objects have the same value, and false otherwise. Two record attributes objects have the same value if each respective pair of attributes have the same value. |
| Name | Description |
|---|---|
operator!= | Return true if the specified lhs and rhs record attributes objects do not have the same value, and false otherwise. Two record attributes objects do not have the same value if one or more respective attributes differ in value. |