mirror of
https://github.com/discourse/discourse.git
synced 2025-06-20 18:01:33 +08:00
DEV: Prefix deprecation notices and api warnings with theme name/id
This commit is contained in:
@ -11,5 +11,11 @@ export default function deprecated(msg, opts = {}) {
|
||||
if (opts.raiseError) {
|
||||
throw msg;
|
||||
}
|
||||
console.warn(msg); // eslint-disable-line no-console
|
||||
|
||||
// Using deferred `require` because this is discourse-specific logic which
|
||||
// we don't want to run in pretty-text/wizard/etc.
|
||||
const consolePrefix =
|
||||
require("discourse/lib/source-identifier")?.consolePrefix() || "";
|
||||
|
||||
console.warn(consolePrefix, msg); //eslint-disable-line no-console
|
||||
}
|
||||
|
Reference in New Issue
Block a user