[#BloombergLP-ball-RecordAttributes] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::RecordAttributes :relfileprefix: ../../ :mrdocs: 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). == Synopsis Declared in `<ball_recordattributes.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class RecordAttributes; ---- == Description 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. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/RecordAttributes/2constructor-0e.adoc[`RecordAttributes`] [.small]#[constructor]# | Constructors | xref:BloombergLP/ball/RecordAttributes/operator_assign.adoc[`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. | xref:BloombergLP/ball/RecordAttributes/category.adoc[`category`] | Return the category attribute of this record attributes object. | xref:BloombergLP/ball/RecordAttributes/clearMessage.adoc[`clearMessage`] | Set the message attribute of this record attributes object to the empty string. Resets the objects returned by the `messageStreamBuf` and `messageStream` methods. | xref:BloombergLP/ball/RecordAttributes/fileName.adoc[`fileName`] | Return the filename attribute of this record attributes object. | xref:BloombergLP/ball/RecordAttributes/kernelThreadID.adoc[`kernelThreadID`] | Return the kernelThreadID attribute of this record attributes object. | xref:BloombergLP/ball/RecordAttributes/lineNumber.adoc[`lineNumber`] | Return the line number attribute of this record attributes object. | xref:BloombergLP/ball/RecordAttributes/message.adoc[`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`. | xref:BloombergLP/ball/RecordAttributes/messageRef.adoc[`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. | xref:BloombergLP/ball/RecordAttributes/messageStream-091.adoc[`messageStream`] | `messageStream` overloads | xref:BloombergLP/ball/RecordAttributes/messageStreamBuf-0f.adoc[`messageStreamBuf`] | `messageStreamBuf` overloads | xref:BloombergLP/ball/RecordAttributes/print.adoc[`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. | xref:BloombergLP/ball/RecordAttributes/processID.adoc[`processID`] | Return the processID attribute of this record attributes object. | xref:BloombergLP/ball/RecordAttributes/setCategory.adoc[`setCategory`] | Set the category attribute of this record attributes object to the specified `category`. | xref:BloombergLP/ball/RecordAttributes/setFileName.adoc[`setFileName`] | Set the filename attribute of this record attributes object to the specified `fileName`. | xref:BloombergLP/ball/RecordAttributes/setKernelThreadID.adoc[`setKernelThreadID`] | Set the kernelThreadID attribute of this record attributes object to the specified `kernelThreadID`. | xref:BloombergLP/ball/RecordAttributes/setLineNumber.adoc[`setLineNumber`] | Set the line number attribute of this record attributes object to the specified `lineNumber`. | xref:BloombergLP/ball/RecordAttributes/setMessage.adoc[`setMessage`] | Set the message attribute of this record attributes object to the specified `message`. Resets the objects returned by the `messageStreamBuf` and `messageStream` methods. | xref:BloombergLP/ball/RecordAttributes/setProcessID.adoc[`setProcessID`] | Set the processID attribute of this record attributes object to the specified `processID`. | xref:BloombergLP/ball/RecordAttributes/setSeverity.adoc[`setSeverity`] | Set the severity attribute of this record attributes object to the specified `severity`. | xref:BloombergLP/ball/RecordAttributes/setThreadID.adoc[`setThreadID`] | Set the threadID attribute of this record attributes object to the specified `threadID`. | xref:BloombergLP/ball/RecordAttributes/setTimestamp.adoc[`setTimestamp`] | Set the timestamp attribute of this record attributes object to the specified `timestamp`. | xref:BloombergLP/ball/RecordAttributes/severity.adoc[`severity`] | Return the severity attribute of this record attributes object. | xref:BloombergLP/ball/RecordAttributes/threadID.adoc[`threadID`] | Return the threadID attribute of this record attributes object. | xref:BloombergLP/ball/RecordAttributes/timestamp.adoc[`timestamp`] | Return the timestamp attribute of this record attributes object. | xref:BloombergLP/ball/RecordAttributes/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<RecordAttributes, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/ball/operator_eq-0b7.adoc[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. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/operator_not_eq-034.adoc[`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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#