Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pimlicolabs/alto into feat/gas-esti…
Browse files Browse the repository at this point in the history
…mation
  • Loading branch information
nikmel2803 committed Nov 30, 2023
2 parents ebedea5 + 98e13e3 commit 61ab3f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/utils/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ function bigintToJson(_key: string, value: any): any {
return value
}

function logLevel (label: string) {
return {
level: label,
};
}

function stringifyWithCircularHandling(obj: AnyObject, replacer?: (key: string, value: any) => any): string {
const cache: Set<any> = new Set()
return JSON.stringify(obj, (key, value) => {
Expand Down Expand Up @@ -52,6 +58,7 @@ export const initDebugLogger = (level = "debug"): Logger => {
}
},
formatters: {
level: logLevel,
log: customSerializer
}
})
Expand All @@ -67,6 +74,7 @@ export const initProductionLogger = (
const l = logger({
base: undefined, // do not log pid and hostname, we don't need it
formatters: {
level: logLevel,
log: customSerializer
}
})
Expand Down

0 comments on commit 61ab3f5

Please sign in to comment.