DiscordSRV

DiscordSRV

86.8k Downloads

Add some prefix to error messages, so that it'd be clear that they came from DiscordSRV

oskarkk opened this issue ยท 1 comments

commented

Why?

I sometimes wonder which one of my 60 plugins gives me these messages in the server console:

[18:07:55 Server thread/ERROR] Your AvatarUrl does not contain the {username} placeholder even though this server is using offline UUIDs.
[18:07:55 Server thread/ERROR] https://cravatar.eu/helmavatar/{username}/{size}.png#{texture} will be used because the default value does not support offline mode servers
[18:07:55 Server thread/ERROR] You should set your AvatarUrl to https://cravatar.eu/helmavatar/{username}/{size}.png#{texture} (or another url that supports usernames) to get rid of this error

And searching the web I found that other people wondered too. It's strange that DiscordSRV gives console errors anonymously like this.

What and How?

Maybe change:

    public static void error(String message) {
        getPlugin().getLogger().severe(message);
    }

To:

    public static void error(String message) {
        getPlugin().getLogger().severe("[DiscordSRV] " + message);
    }

Are there alternatives?

Or maybe do this to all console messages, not only errors, but I'm not sufficiently familiar with DiscordSRV to know if it's a good idea.

Checks

  • I have used the search at least once to check if my idea has already been suggested and perhaps already implemented.

Anything else

No response

commented

Plugins are not responsible for handling their log prefix. That's already configured in the logging framework. If you're not seeing the prefixes (which you're not), that's a problem between the logging framework (Minecraft uses Log4J) and however you're viewing the log.