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({
7272} : SentryUnpluginFactoryOptions ) {
7373 return createUnplugin < Options | undefined , true > ( ( userOptions = { } , unpluginMetaContext ) => {
7474 const logger = createLogger ( {
75- prefix : `[sentry-${ unpluginMetaContext . framework } -plugin]` ,
75+ prefix :
76+ userOptions . _metaOptions ?. loggerPrefixOverride ??
77+ `[sentry-${ unpluginMetaContext . framework } -plugin]` ,
7678 silent : userOptions . silent ?? false ,
7779 debug : userOptions . debug ?? false ,
7880 } ) ;
Original file line number Diff line number Diff line change @@ -320,6 +320,19 @@ export interface Options {
320320 // eslint-disable-next-line @typescript-eslint/no-explicit-any
321321 moduleMetadata ?: any | ModuleMetadataCallback ;
322322 } ;
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+ } ;
323336}
324337
325338export interface ModuleMetadataCallbackArgs {
You can’t perform that action at this time.
0 commit comments