Skip to content

Commit

Permalink
Pipe statsig events to logger
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Dec 17, 2024
1 parent 20d4266 commit b4d5e19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/statsig/statsig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export function logEvent<E extends keyof LogEvents>(
if (Statsig.initializeCalled()) {
Statsig.logEvent(eventName, null, fullMetadata)
}
logger.info(eventName)
logger.debug(JSON.stringify(fullMetadata))
} catch (e) {
// A log should never interrupt the calling code, whatever happens.
logger.error('Failed to log an event', {message: e})
Expand Down

0 comments on commit b4d5e19

Please sign in to comment.