File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
packages/hydrogen/src/utilities/log Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @shopify/hydrogen ' : patch
3+ ---
4+
5+ Log extra params in default error logger
Original file line number Diff line number Diff line change @@ -43,11 +43,14 @@ const defaultLogger: Logger = {
4343 } ,
4444 error ( context , error , ...extra ) {
4545 const url = context ? ` ${ context . url } ` : '' ;
46+ const extraMessage = extra . length ? `\n${ extra . join ( '\n' ) } ` : '' ;
4647
4748 if ( error instanceof Error ) {
48- console . error ( red ( `Error processing route:${ url } \n${ error . stack } ` ) ) ;
49+ console . error (
50+ red ( `Error processing route:${ url } \n${ error . stack } ${ extraMessage } ` )
51+ ) ;
4952 } else {
50- console . error ( red ( `Error:${ url } ${ error } ` ) ) ;
53+ console . error ( red ( `Error:${ url } ${ error } ${ extraMessage } ` ) ) ;
5154 }
5255 } ,
5356 fatal ( context , ...args ) {
You can’t perform that action at this time.
0 commit comments