Skip to content

Commit e1f8395

Browse files
committed
refactor: shorter logging messages
1 parent fa0d1bc commit e1f8395

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/nuxt/src/runtime/plugins/storage.server.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default defineNitroPlugin(async _nitroApp => {
2929
// Mounts are suffixed with a colon, so we need to add it to the set items
3030
const userMounts = new Set((userStorageMounts as string[]).map(m => `${m}:`));
3131

32-
debug.log('[Storage Instrumentation] Starting to instrument storage drivers...');
32+
debug.log('[storage] Starting to instrument storage drivers...');
3333

3434
// Get all mounted storage drivers
3535
const mounts = storage.getMounts();
@@ -42,7 +42,7 @@ export default defineNitroPlugin(async _nitroApp => {
4242
try {
4343
instrumentDriver(mount.driver, mount.base);
4444
} catch {
45-
debug.error(`[Storage Instrumentation] Failed to unmount mount: "${mount.base}"`);
45+
debug.error(`[storage] Failed to unmount mount: "${mount.base}"`);
4646
}
4747

4848
// Wrap the mount method to instrument future mounts
@@ -56,12 +56,12 @@ export default defineNitroPlugin(async _nitroApp => {
5656
function instrumentDriver(driver: MaybeInstrumentedDriver, mountBase: string): Driver {
5757
// Already instrumented, skip...
5858
if (driver.__sentry_instrumented__) {
59-
debug.log(`[Storage Instrumentation] Driver already instrumented: "${driver.name}". Skipping...`);
59+
debug.log(`[storage] Driver already instrumented: "${driver.name}". Skipping...`);
6060

6161
return driver;
6262
}
6363

64-
debug.log(`[Storage Instrumentation] Instrumenting driver: "${driver.name}" on mount: "${mountBase}"`);
64+
debug.log(`[storage] Instrumenting driver: "${driver.name}" on mount: "${mountBase}"`);
6565

6666
// List of driver methods to instrument
6767
const methodsToInstrument: (keyof Driver)[] = [
@@ -109,7 +109,7 @@ function createMethodWrapper(
109109
async apply(target, thisArg, args) {
110110
const attributes = getSpanAttributes(methodName, driverName ?? 'unknown', mountBase);
111111

112-
debug.log(`[Storage Instrumentation] Running method: "${methodName}" on driver: "${driverName}"`);
112+
debug.log(`[storage] Running method: "${methodName}" on driver: "${driverName}"`);
113113

114114
return startSpan(
115115
{
@@ -149,7 +149,7 @@ function wrapStorageMount(storage: Storage): Storage['mount'] {
149149
const original = storage.mount;
150150

151151
function mountWithInstrumentation(base: string, driver: Driver): Storage {
152-
debug.log(`[Storage Instrumentation] Instrumenting mount: "${base}"`);
152+
debug.log(`[storage] Instrumenting mount: "${base}"`);
153153

154154
const instrumentedDriver = instrumentDriver(driver, base);
155155

0 commit comments

Comments
 (0)