diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/logger.ts | 6 | ||||
-rw-r--r-- | server/helpers/markdown.ts | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts index 4bd00e503..81b0dfaaa 100644 --- a/server/helpers/logger.ts +++ b/server/helpers/logger.ts | |||
@@ -123,10 +123,9 @@ function buildLogger (labelSuffix?: string) { | |||
123 | } | 123 | } |
124 | 124 | ||
125 | function bunyanLogFactory (level: string) { | 125 | function bunyanLogFactory (level: string) { |
126 | return function () { | 126 | return function (...params: any[]) { |
127 | let meta = null | 127 | let meta = null |
128 | let args: any[] = [] | 128 | let args = [].concat(params) |
129 | args.concat(arguments) | ||
130 | 129 | ||
131 | if (arguments[0] instanceof Error) { | 130 | if (arguments[0] instanceof Error) { |
132 | meta = arguments[0].toString() | 131 | meta = arguments[0].toString() |
@@ -143,6 +142,7 @@ function bunyanLogFactory (level: string) { | |||
143 | } | 142 | } |
144 | 143 | ||
145 | const bunyanLogger = { | 144 | const bunyanLogger = { |
145 | level: () => { }, | ||
146 | trace: bunyanLogFactory('debug'), | 146 | trace: bunyanLogFactory('debug'), |
147 | debug: bunyanLogFactory('debug'), | 147 | debug: bunyanLogFactory('debug'), |
148 | info: bunyanLogFactory('info'), | 148 | info: bunyanLogFactory('info'), |
diff --git a/server/helpers/markdown.ts b/server/helpers/markdown.ts index 41e57d857..ebf479b98 100644 --- a/server/helpers/markdown.ts +++ b/server/helpers/markdown.ts | |||
@@ -34,7 +34,7 @@ const mdToPlainText = text => { | |||
34 | 34 | ||
35 | return safeHtml.replace(/<[^>]+>/g, '') | 35 | return safeHtml.replace(/<[^>]+>/g, '') |
36 | .replace(/\n$/, '') | 36 | .replace(/\n$/, '') |
37 | .replace('\n', ', ') | 37 | .replace(/\n/g, ', ') |
38 | } | 38 | } |
39 | 39 | ||
40 | // --------------------------------------------------------------------------- | 40 | // --------------------------------------------------------------------------- |