We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9800384 commit c5988ccCopy full SHA for c5988cc
packages/logger/src/index.ts
@@ -77,6 +77,11 @@ debug.formatters.a = (v?: Multiaddr): string => {
77
return v == null ? 'undefined' : v.toString()
78
}
79
80
+// Add a formatter for stringifying Errors
81
+debug.formatters.e = (v?: Error): string => {
82
+ return v == null ? 'undefined' : v.stack ?? v.message
83
+}
84
+
85
export interface Logger {
86
(formatter: any, ...args: any[]): void
87
error(formatter: any, ...args: any[]): void
0 commit comments