Skip to content

Commit

Permalink
feat(custom-http-status): add support for custom HTTP status codes on…
Browse files Browse the repository at this point in the history
… all log types; update dependencies; cleanup
  • Loading branch information
mikaelvesavuori committed Oct 20, 2022
1 parent 56b56df commit f9fd9cb
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 18 deletions.
12 changes: 6 additions & 6 deletions lib/entities/MikroLog.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MikroLogInput, LogOutput, Message } from '../interfaces/MikroLog';
import { MikroLogInput, LogOutput, Message, HttpStatusCode } from '../interfaces/MikroLog';
export declare class MikroLog {
private static instance;
private static metadataConfig;
Expand All @@ -10,11 +10,11 @@ export declare class MikroLog {
static reset(): void;
static enrich(input: MikroLogInput): void;
setDebugSamplingRate(samplingPercent: number): number;
debug(message: Message): LogOutput;
info(message: Message): LogOutput;
log(message: Message): LogOutput;
warn(message: Message): LogOutput;
error(message: Message): LogOutput;
debug(message: Message, httpStatusCode?: HttpStatusCode): LogOutput;
info(message: Message, httpStatusCode?: HttpStatusCode): LogOutput;
log(message: Message, httpStatusCode?: HttpStatusCode): LogOutput;
warn(message: Message, httpStatusCode?: HttpStatusCode): LogOutput;
error(message: Message, httpStatusCode?: HttpStatusCode): LogOutput;
private initDebugSampleLevel;
private loadEnrichedEnvironment;
private produceDynamicMetadata;
Expand Down
36 changes: 26 additions & 10 deletions 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.

2 changes: 1 addition & 1 deletion lib/infrastructure/metadataUtils.js.map

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

0 comments on commit f9fd9cb

Please sign in to comment.