Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log date formatter changed with the latest build #13

Closed
frebib opened this issue Mar 2, 2020 · 2 comments · Fixed by #14
Closed

Log date formatter changed with the latest build #13

frebib opened this issue Mar 2, 2020 · 2 comments · Fixed by #14

Comments

@frebib
Copy link
Contributor

frebib commented Mar 2, 2020

Thanks for updating/fixing the logging in the latest build.
The format changed for me, though

2019-11-25T20:45Z [INFO] [survival] <frebib> (quact)
2019-12-08T15:17Z [INFO] [survival] <frebib> zzzzzzz
22:27:04 [INFO] [creative] <frebib> test
22:27:04 [INFO] [creative] <frebib> hi
22:27:05 [INFO] [creative] <frebib> sup

Our Bungeecord instances uses a different date format specified at runtime:
spritsail/bungeecord@b79e9f8
The ConciseFormatter that was used before reads that variable, and defaults to HH:mm:ss:
https://github.com/SpigotMC/BungeeCord/blob/master/log/src/main/java/net/md_5/bungee/log/ConciseFormatter.java#L17

Could this override be re-added, please

@frebib
Copy link
Contributor Author

frebib commented Mar 2, 2020

Better still, it looks like the ConciseFormatter can still be used, but using one of the Lombok constructors, as upstream does here: SpigotMC/BungeeCord@bf673c5#diff-bb12962309e5cb9baadb0b934fd0f074R29

The empty constructor is Protected, which is why it throws nasty warnings

2020-02-25T12:06Z [WARNING] Exception encountered when loading plugin: gChat
java.lang.IllegalAccessError: tried to access method java.util.logging.Formatter.<init>()V from class me.lucko.gchat.GChatPlugin
    at me.lucko.gchat.GChatPlugin.loadLogger(GChatPlugin.java:208)
    at me.lucko.gchat.GChatPlugin.loadConfig(GChatPlugin.java:183)
    at me.lucko.gchat.GChatPlugin.onEnable(GChatPlugin.java:87)
    at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:250)
    at net.md_5.bungee.BungeeCord.start(BungeeCord.java:280)
    at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62)
    at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)

https://docs.oracle.com/javase/8/docs/api/java/util/logging/Formatter.html#Formatter--

@lucko
Copy link
Owner

lucko commented Mar 3, 2020

Will accept a PR for this

frebib added a commit to frebib/gChat that referenced this issue Mar 4, 2020
Allows overriding the date format in chat logs as before with the system
property "net.md_5.bungee.log-date-format"

Fixes lucko#13
@lucko lucko closed this as completed in #14 May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants