Skip to content

Commit

Permalink
Fix logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dneilroth committed Aug 26, 2024
1 parent 49aa81b commit 503ef98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class CustomLogger {
} else {
console.log(message, meta);
}
if (typeof window === 'undefined' && typeof message !== 'string') {
this.sendToDatadog(level, message as string, meta).catch(() => {
if (typeof window === 'undefined' && message !== undefined) {
this.sendToDatadog(level, JSON.stringify(message), meta).catch(() => {
console.error('Failed to send log to Datadog');
});
}
Expand Down

0 comments on commit 503ef98

Please sign in to comment.