Skip to content

Commit 8190017

Browse files
committed
Format source
1 parent f9fc041 commit 8190017

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ For `pretty` logs:
686686
For `JSON` logs (no formatting happens here):
687687
```typescript
688688
const logger = new Logger({
689-
type: "pretty",
689+
type: "json",
690690
overwrite: {
691691
transportJSON: (logObjWithMeta: any) => {
692692
// transport the LogObj to console, StdOut, a file or an external service

src/BaseLogger.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,13 @@ export class BaseLogger<LogObj> {
213213
return Object.getOwnPropertyNames(source).reduce((o, prop) => {
214214
o[prop] = keys.includes(this.settings?.maskValuesOfKeysCaseInsensitive !== true ? prop : prop.toLowerCase())
215215
? this.settings.maskPlaceholder
216-
: (()=>{
217-
try{
218-
return this._recursiveCloneAndMaskValuesOfKeys((source as Record<string, unknown>)[prop], keys, seen);
219-
}catch(e){
220-
return null;
221-
}
222-
})();
216+
: (() => {
217+
try {
218+
return this._recursiveCloneAndMaskValuesOfKeys((source as Record<string, unknown>)[prop], keys, seen);
219+
} catch (e) {
220+
return null;
221+
}
222+
})();
223223
return o;
224224
}, baseObject) as T;
225225
} else {

src/runtime/browser/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ export function getCallerStackFrame(stackDepthLevel: number, error: Error = Erro
6262
}
6363

6464
export function getErrorTrace(error: Error): IStackFrame[] {
65-
return ((error as Error)?.stack
66-
?.split("\n") ?? [])
65+
return ((error as Error)?.stack?.split("\n") ?? [])
6766
?.filter((line: string) => !line.includes("Error: "))
6867
?.reduce((result: IStackFrame[], line: string) => {
6968
result.push(stackLineToStackFrame(line));

0 commit comments

Comments
 (0)