Skip to content

Commit d8faaa2

Browse files
authored
ref(solidstart): Use debug instead of logger (#16936)
resolves #16935
1 parent b0623d8 commit d8faaa2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/solidstart/src/config/withSentry.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { logger } from '@sentry/core';
1+
import { debug } from '@sentry/core';
22
import type { Nitro } from 'nitropack';
33
import { addSentryPluginToVite } from '../vite/sentrySolidStartVite';
44
import type { SentrySolidStartPluginOptions } from '../vite/types';
@@ -55,7 +55,7 @@ export function withSentry(
5555
await addDynamicImportEntryFileWrapper({ nitro, rollupConfig: config, sentryPluginOptions });
5656

5757
sentrySolidStartPluginOptions.debug &&
58-
logger.log(
58+
debug.log(
5959
'Wrapping the server entry file with a dynamic `import()`, so Sentry can be preloaded before the server initializes.',
6060
);
6161
} else {

packages/solidstart/src/server/utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { EventProcessor, Options } from '@sentry/core';
2-
import { logger } from '@sentry/core';
2+
import { debug } from '@sentry/core';
33
import { flush, getGlobalScope } from '@sentry/node';
44
import { DEBUG_BUILD } from '../common/debug-build';
55

@@ -9,11 +9,11 @@ export async function flushIfServerless(): Promise<void> {
99

1010
if (isServerless) {
1111
try {
12-
DEBUG_BUILD && logger.log('Flushing events...');
12+
DEBUG_BUILD && debug.log('Flushing events...');
1313
await flush(2000);
14-
DEBUG_BUILD && logger.log('Done flushing events');
14+
DEBUG_BUILD && debug.log('Done flushing events');
1515
} catch (e) {
16-
DEBUG_BUILD && logger.log('Error while flushing events:\n', e);
16+
DEBUG_BUILD && debug.log('Error while flushing events:\n', e);
1717
}
1818
}
1919
}
@@ -46,7 +46,7 @@ export function filterLowQualityTransactions(options: Options): void {
4646
}
4747
// Filter out transactions for build assets
4848
if (event.transaction?.match(/^GET \/_build\//)) {
49-
options.debug && logger.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
49+
options.debug && debug.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
5050
return null;
5151
}
5252
return event;

0 commit comments

Comments
 (0)