8#ifndef INCLUDED_BALL_RECORDATTRIBUTES
9#define INCLUDED_BALL_RECORDATTRIBUTES
231#include <balscm_version.h>
246#include <bsl_ostream.h>
247#include <bsl_string.h>
248#include <bsl_string_view.h>
282 k_RESET_MESSAGE_STREAM_CAPACITY = 256
291 Uint64 d_kernelThreadID;
300 bsl::ostream d_messageStream;
312 void resetMessageStreamState();
481 bsl::ostream&
print(bsl::ostream& stream,
483 int spacesPerLevel = 4)
const;
517void RecordAttributes::resetMessageStreamState()
523 d_messageStream.exceptions(bsl::ios_base::goodbit);
524 d_messageStream.clear();
525 d_messageStream.tie(0);
526 d_messageStream.flags(bsl::ios_base::dec | bsl::ios_base::skipws);
527 d_messageStream.fill(
' ');
528 d_messageStream.precision(6);
529 d_messageStream.width(0);
541 k_RESET_MESSAGE_STREAM_CAPACITY < d_messageStreamBuf.
capacity())) {
543 d_messageStreamBuf.
reset();
546 d_messageStreamBuf.pubseekpos(0);
548 resetMessageStreamState();
554 return d_messageStreamBuf;
560 return d_messageStream;
615 return d_category.
c_str();
621 return d_fileName.
c_str();
651 return d_kernelThreadID;
657 return d_messageStreamBuf;
663 return d_messageStream;
676bool ball::operator!=(
const RecordAttributes& lhs,
const RecordAttributes& rhs)
678 return !(lhs == rhs);
683 const RecordAttributes&
object)
685 return object.
print(stream, 0, -1);
Definition ball_recordattributes.h:275
void clearMessage()
Definition ball_recordattributes.h:534
bslstl::StringRef messageRef() const
RecordAttributes & operator=(const RecordAttributes &rhs)
BSLMF_NESTED_TRAIT_DECLARATION(RecordAttributes, bslma::UsesBslmaAllocator)
RecordAttributes(const RecordAttributes &original, bslma::Allocator *basicAllocator=0)
bsl::ostream & messageStream()
Definition ball_recordattributes.h:558
RecordAttributes(const bdlt::Datetime ×tamp, int processID, bsls::Types::Uint64 threadID, const bsl::string_view &fileName, int lineNumber, const bsl::string_view &category, int severity, const bsl::string_view &message, bslma::Allocator *basicAllocator=0)
int lineNumber() const
Return the line number attribute of this record attributes object.
Definition ball_recordattributes.h:625
~RecordAttributes()=default
Destroy this object.
bsls::Types::Uint64 kernelThreadID() const
Return the kernelThreadID attribute of this record attributes object.
Definition ball_recordattributes.h:649
void setProcessID(int processID)
Definition ball_recordattributes.h:582
bdlsb::MemOutStreamBuf & messageStreamBuf()
Definition ball_recordattributes.h:552
void setMessage(const bsl::string_view &message)
void setTimestamp(const bdlt::Datetime ×tamp)
Definition ball_recordattributes.h:606
void setThreadID(bsls::Types::Uint64 threadID)
Definition ball_recordattributes.h:594
const bdlt::Datetime & timestamp() const
Return the timestamp attribute of this record attributes object.
Definition ball_recordattributes.h:667
bsls::Types::Uint64 threadID() const
Return the threadID attribute of this record attributes object.
Definition ball_recordattributes.h:643
void setLineNumber(int lineNumber)
Definition ball_recordattributes.h:576
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
const char * category() const
Return the category attribute of this record attributes object.
Definition ball_recordattributes.h:613
int processID() const
Return the processID attribute of this record attributes object.
Definition ball_recordattributes.h:631
friend bool operator==(const RecordAttributes &, const RecordAttributes &)
void setSeverity(int severity)
Definition ball_recordattributes.h:588
const char * message() const
void setKernelThreadID(bsls::Types::Uint64 kernelThreadID)
Definition ball_recordattributes.h:600
void setFileName(const bsl::string_view &fileName)
Definition ball_recordattributes.h:570
const char * fileName() const
Return the filename attribute of this record attributes object.
Definition ball_recordattributes.h:619
int severity() const
Return the severity attribute of this record attributes object.
Definition ball_recordattributes.h:637
void setCategory(const bsl::string_view &category)
Definition ball_recordattributes.h:564
RecordAttributes(const bdlt::Datetime ×tamp, int processID, bsls::Types::Uint64 threadID, bsls::Types::Uint64 kernelThreadID, const bsl::string_view &fileName, int lineNumber, const bsl::string_view &category, int severity, const bsl::string_view &message, bslma::Allocator *basicAllocator=0)
RecordAttributes(bslma::Allocator *basicAllocator=0)
Definition bdlsb_memoutstreambuf.h:212
bsl::size_t capacity() const
Definition bdlsb_memoutstreambuf.h:407
void reset()
Definition bdlsb_memoutstreambuf.h:399
Definition bdlt_datetime.h:330
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bslstl_stringview.h:471
Definition bslstl_string.h:1252
const CHAR_TYPE * c_str() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:7405
Definition bslma_allocator.h:545
Definition bslstl_stringref.h:374
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition ball_administration.h:214
bsl::ostream & operator<<(bsl::ostream &output, const Attribute &attribute)
bool operator!=(const Attribute &lhs, const Attribute &rhs)
Definition bslma_usesbslmaallocator.h:344
unsigned long long Uint64
Definition bsls_types.h:139