UNPKG

@dyihoon90/glogging

Version:

HTTP request logging middleware & transaction function decorator for express, using winston

44 lines (43 loc) 1.12 kB
export declare enum TransactionCategory { AUTH = "AUTH", TRANS = "TRANS", HTTP = "HTTP" } export declare enum TransactionStatus { SUCCESS = "SUCCESS", FAILURE = "FAILURE" } export interface ITransactionLoggingOptions { /** * If true, the transaction results will be logged * If false, the transaction results will not be logged * @default false */ toLogResults?: boolean; /** * If true, the transaction success will be logged * If false, only transacion failure will be logged * @default true */ toLogSuccessTxn?: boolean; /** * Properties to be redacted from the transaction log */ redactedProperties?: Array<string | number | symbol>; } export interface ITransactionMetadata { trxCategory: TransactionCategory; trxModule: string; trxName: string; filename?: string; } export interface IHTTPTransactionMetadata { trxModule: string; trxName: string; filename?: string; } export interface IDecoratorMetadata { trxCategory: TransactionCategory; trxModule: string; filename?: string; }