@@ -39,9 +39,10 @@ export class JsonLoggerService implements LoggerInterface {
3939 }
4040 const formatted = JsonLoggerService . prepare ( message ) ;
4141 const formattedTrace = JsonLoggerService . prepare ( trace ) ;
42+ const formattedContext = JsonLoggerService . prepare ( context ) ;
4243 this . callFunction ( 'error' , formatted , {
4344 trace : formattedTrace ,
44- context : context || this . context ,
45+ context : formattedContext || this . context ,
4546 } ) ;
4647 }
4748
@@ -50,8 +51,9 @@ export class JsonLoggerService implements LoggerInterface {
5051 return ;
5152 }
5253 const formatted = JsonLoggerService . prepare ( message ) ;
54+ const formattedContext = JsonLoggerService . prepare ( context ) ;
5355 this . callFunction ( 'warn' , formatted , {
54- context : context || this . context ,
56+ context : formattedContext || this . context ,
5557 } ) ;
5658 }
5759
@@ -60,8 +62,9 @@ export class JsonLoggerService implements LoggerInterface {
6062 return ;
6163 }
6264 const formatted = JsonLoggerService . prepare ( message ) ;
65+ const formattedContext = JsonLoggerService . prepare ( context ) ;
6366 this . callFunction ( 'log' , formatted , {
64- context : context || this . context ,
67+ context : formattedContext || this . context ,
6568 } ) ;
6669 }
6770
@@ -70,8 +73,9 @@ export class JsonLoggerService implements LoggerInterface {
7073 return ;
7174 }
7275 const formatted = JsonLoggerService . prepare ( message ) ;
76+ const formattedContext = JsonLoggerService . prepare ( context ) ;
7377 this . callFunction ( 'info' , formatted , {
74- context : context || this . context ,
78+ context : formattedContext || this . context ,
7579 } ) ;
7680 }
7781
@@ -80,8 +84,9 @@ export class JsonLoggerService implements LoggerInterface {
8084 return ;
8185 }
8286 const formatted = JsonLoggerService . prepare ( message ) ;
87+ const formattedContext = JsonLoggerService . prepare ( context ) ;
8388 this . callFunction ( 'debug' , formatted , {
84- context : context || this . context ,
89+ context : formattedContext || this . context ,
8590 } ) ;
8691 }
8792
@@ -90,8 +95,9 @@ export class JsonLoggerService implements LoggerInterface {
9095 return ;
9196 }
9297 const formatted = JsonLoggerService . prepare ( message ) ;
98+ const formattedContext = JsonLoggerService . prepare ( context ) ;
9399 this . callFunction ( 'verbose' , formatted , {
94- context : context || this . context ,
100+ context : formattedContext || this . context ,
95101 } ) ;
96102 }
97103
0 commit comments