Skip to main content

@rbxts/rlog > sourceMetadataEnricher

sourceMetadataEnricher() function​

Attaches source_metadata to the output of a log entry.

Signature:

export declare function sourceMetadataEnricher(entry: LogEntry): LogEntry;

Parameters​

Parameter

Type

Description

entry

LogEntry

Returns:

LogEntry

Remarks​

The metadata is attached under the source_metadata key in encoded_data.

If a value is undefined, it will not be populated.

Example​

[INFO]: Actions -> Hello world!
{
data: {
source_metadata: {
function_name: "doAction",
nearest_function_name: "doAction",
file_path: "ReplicatedStorage.TS.actions",
line_number: 5
}
}
}