File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
packages/bundler-plugin-core/src Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ export function sentryUnpluginFactory({
72
72
} : SentryUnpluginFactoryOptions ) {
73
73
return createUnplugin < Options | undefined , true > ( ( userOptions = { } , unpluginMetaContext ) => {
74
74
const logger = createLogger ( {
75
- prefix : `[sentry-${ unpluginMetaContext . framework } -plugin]` ,
75
+ prefix :
76
+ userOptions . _metaOptions ?. loggerPrefixOverride ??
77
+ `[sentry-${ unpluginMetaContext . framework } -plugin]` ,
76
78
silent : userOptions . silent ?? false ,
77
79
debug : userOptions . debug ?? false ,
78
80
} ) ;
Original file line number Diff line number Diff line change @@ -320,6 +320,19 @@ export interface Options {
320
320
// eslint-disable-next-line @typescript-eslint/no-explicit-any
321
321
moduleMetadata ?: any | ModuleMetadataCallback ;
322
322
} ;
323
+
324
+ /**
325
+ * Options that are useful for building wrappers around the plugin. You likely don't need these options unless you
326
+ * are distributing a tool that depends on this plugin
327
+ */
328
+ _metaOptions ?: {
329
+ /**
330
+ * Overrides the prefix that come before logger messages. (e.g. `[some-prefix] Info: Some log message`)
331
+ *
332
+ * Example value: `[sentry-webpack-plugin (client)]`
333
+ */
334
+ loggerPrefixOverride ?: string ;
335
+ } ;
323
336
}
324
337
325
338
export interface ModuleMetadataCallbackArgs {
You can’t perform that action at this time.
0 commit comments