9#ifndef INCLUDED_BALL_FILEOBSERVER2
10#define INCLUDED_BALL_FILEOBSERVER2
404#include <balscm_version.h>
424#include <bsl_fstream.h>
425#include <bsl_functional.h>
426#include <bsl_iosfwd.h>
427#include <bsl_memory.h>
428#include <bsl_string.h>
477 bsl::ostream d_logOutStream;
496 bool d_publishInLocalTime;
501 bool d_suppressUniqueFileName;
547 void logRecordDefault(bsl::ostream& stream,
const Record& record);
569 int rotateIfNecessary(
bsl::string *rotatedLogFileName,
578 template <
class t_STRING>
579 bool isFileLoggingEnabledImpl(t_STRING *result)
const;
672 bool appendTimestampFlag);
740 const
bdlt::Datetime& startTime);
779#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
Definition ball_context.h:295
Definition ball_fileobserver2.h:449
void rotateOnSize(int size)
bsl::function< void(int, const bsl::string &)> OnFileRotationCallback
Definition ball_fileobserver2.h:470
void rotateOnTimeInterval(const bdlt::DatetimeInterval &interval)
bool isSuppressUniqueFileNameOnRotation() const
bdlt::DatetimeInterval rotationLifetime() const
bdlt::DatetimeInterval localTimeOffset() const
void disablePublishInLocalTime()
void rotateOnLifetime(const bdlt::DatetimeInterval &timeInterval)
void releaseRecords() BSLS_KEYWORD_OVERRIDE
Definition ball_fileobserver2.h:836
bool isFileLoggingEnabled() const
void disableLifetimeRotation()
void disableTimeIntervalRotation()
void disableFileLogging()
~FileObserver2() BSLS_KEYWORD_OVERRIDE
void enablePublishInLocalTime()
void publish(const Record &record, const Context &context) BSLS_KEYWORD_OVERRIDE
bsl::function< void(bsl::ostream &, const Record &)> LogRecordFunctor
Definition ball_fileobserver2.h:456
void setOnFileRotationCallback(const OnFileRotationCallback &onRotationCallback)
int enableFileLogging(const char *logFilenamePattern)
BSLMF_NESTED_TRAIT_DECLARATION(FileObserver2, bslma::UsesBslmaAllocator)
void disableSizeRotation()
bool isPublishInLocalTimeEnabled() const
void setLogFileFunctor(const LogRecordFunctor &logFileFunctor)
FileObserver2(bslma::Allocator *basicAllocator=0)
void suppressUniqueFileNameOnRotation(bool suppress)
Definition ball_observer.h:235
Definition ball_record.h:178
Definition bdls_fdstreambuf.h:653
Definition bdlt_datetimeinterval.h:201
Definition bdlt_datetime.h:331
Definition bslstl_string.h:1281
Forward declaration.
Definition bslstl_function.h:934
Definition bslstl_sharedptr.h:1830
Definition bslma_allocator.h:457
Definition bslmt_mutex.h:315
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:653
Definition ball_administration.h:214
Definition bbldc_basicisma30360.h:112
Definition bdlb_printmethods.h:283
Definition bdldfp_decimal.h:5188
Definition bslma_usesbslmaallocator.h:343