Skip to content

Commit

Permalink
disable logging for error boundary (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenny-statsig authored Feb 6, 2024
1 parent 191152c commit 07b67ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ErrorBoundary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ export default class ErrorBoundary {
error: unknown,
{ getExtraData, configName }: CaptureOptions = {}
): void {
if (this.sdkOptions.isAllLoggingDisabled()) {
return;
}
(async () => {
try {
const extra =
Expand Down
2 changes: 0 additions & 2 deletions src/__tests__/ErrorBoundary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ describe('ErrorBoundary', () => {
beforeEach(() => {
options = new StatsigSDKOptions({
api: 'www.google.com',
disableAllLogging: true,
loggingBufferMaxSize: 2046,
initializeValues: { feature_gates: [] },
userPersistentStorage: new FakeUserPersistentStorage(),
Expand Down Expand Up @@ -125,7 +124,6 @@ describe('ErrorBoundary', () => {
info: err.stack,
statsigOptions: {
api: 'www.google.com',
disableAllLogging: true,
loggingBufferMaxSize: 2046,
initializeValues: "set",
userPersistentStorage: "set",
Expand Down

0 comments on commit 07b67ee

Please sign in to comment.