Skip to content

Commit

Permalink
feat(setCorrelationId): add support for setting correlation ID manual…
Browse files Browse the repository at this point in the history
…ly in enrich() or in public method; update README
  • Loading branch information
mikaelvesavuori committed Oct 22, 2022
1 parent 120dc8b commit 3c1d3aa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/entities/MikroLog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ export declare class MikroLog {
private static metadataConfig;
private static event;
private static context;
private static correlationId;
private static debugSamplingLevel;
private static isDebugLogSampled;
private constructor();
static start(input?: MikroLogInput): MikroLog;
static reset(): void;
static enrich(input: MikroLogInput): void;
setCorrelationId(correlationId: string): void;
setDebugSamplingRate(samplingPercent: number): number;
isDebugLogSampled(): boolean;
debug(message: Message, httpStatusCode?: HttpStatusCode): LogOutput;
Expand Down
7 changes: 6 additions & 1 deletion lib/entities/MikroLog.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/entities/MikroLog.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/interfaces/MikroLog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface MikroLogInput {
metadataConfig?: StaticMetadataConfigInput | Record<string, any>;
event?: any;
context?: any;
correlationId?: string;
}
export interface LogInput {
readonly message: Message;
Expand Down

0 comments on commit 3c1d3aa

Please sign in to comment.