BloombergLP::ball::Log::getRecord

Return a modifiable record with the specified file and line.

Synopsis

Declared in <ball_log.h>

static
Record*
getRecord(
    Category const* category,
    std::string_view const& fileName,
    int lineNumber);

Description

Return the address of a modifiable record having the specified fileName and lineNumber attributes. The memory for the record will be supplied by the allocator held by the logger manager singleton if the specified category is non-null, or by the currently installed default allocator otherwise. The behavior is undefined unless the logger manager singleton is initialized when category is non-null. Note that the returned Record must subsequently be supplied to a call to the 3-argument logMessage method.

Return Value

address of a modifiable record with the given attributes

Parameters

NameDescription
categorycategory used to select the record allocator, or 0
fileNamesource file name attribute for the record
lineNumbersource line number attribute for the record