meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
1 changed files with
9 additions and
7 deletions
-
src/logger.js
|
@ -148,6 +148,7 @@ export default { |
|
|
critical: (error: Error) => { |
|
|
critical: (error: Error) => { |
|
|
addLog('critical', error) |
|
|
addLog('critical', error) |
|
|
console.error(error) |
|
|
console.error(error) |
|
|
|
|
|
if (!process.env.STORYBOOK_ENV) { |
|
|
try { |
|
|
try { |
|
|
if (typeof window !== 'undefined') { |
|
|
if (typeof window !== 'undefined') { |
|
|
require('sentry/browser').captureException(error) |
|
|
require('sentry/browser').captureException(error) |
|
@ -157,6 +158,7 @@ export default { |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
console.warn("Can't send to sentry", error, e) |
|
|
console.warn("Can't send to sentry", error, e) |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
exportLogs: (): Array<{ type: string, date: Date, args: Array<any> }> => |
|
|
exportLogs: (): Array<{ type: string, date: Date, args: Array<any> }> => |
|
|