Skip to content

Commit

Permalink
Describe the new LoggingEvent data
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Jul 23, 2024
1 parent 4565ac0 commit 4b8133a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/cpp/loggingevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct LoggingEvent::LoggingEventPrivate
log4cxx_time_t timeStamp;

/** The is the location where this log statement was written. */
const LOG4CXX_NS::spi::LocationInfo locationInfo;
const spi::LocationInfo locationInfo;


/** The identifier of thread in which this logging event
Expand All @@ -152,8 +152,16 @@ struct LoggingEvent::LoggingEventPrivate

std::chrono::time_point<std::chrono::system_clock> chronoTimeStamp;

/**
* This ensures the above string references remain valid
* for the lifetime of this LoggingEvent (i.e. even after thread termination).
*/
ThreadSpecificData::OtherDataPtr pNames = ThreadSpecificData::getCurrentData()->getOtherData();

/**
* Used to hold the diagnostic context when the lifetime
* of this LoggingEvent exceeds the duration of the logging request.
*/
struct DiagnosticContext
{
Optional<NDC::DiagnosticContext> ctx;
Expand Down

0 comments on commit 4b8133a

Please sign in to comment.