fileTagEnricher() function
Enricher for adding a tag to a log matching the file path, if absent.
Signature:
export declare function fileTagEnricher(entry: LogEntry): LogEntry;
Parameters
Parameter | Type | Description |
---|---|---|
entry |
Returns:
Remarks
If the entry doesn't have a tag, then this enricher will use the file_path of where log occurred instead.
Example
const logger = new RLog({ enrichers: [fileTagEnricher] });
logger.i("Hello world!");
// > [INFO]: ReplicatedStorage.TS.main -> Hello world!