-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Support for LogLevel in EffLog #6659
base: dev/feature
Are you sure you want to change the base?
Conversation
Added wats to declare severity when logging
Updated `@Since` to include when severity to logs was added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have more probably just for now here's this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More changes near you. Let's update the #toString(Event e, boolean debug)
while we're here, to include severity tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, have you actually tested this? I'd like to see a screenshot of the output.
adding breaking changes due to adding INFO to the output by default. |
I have not |
Sorry but how does this apply a breaking change? Very confused there. |
alright so let's do an actual test equip
this should log on reload my guess is severe will not work but info and warning will |
This is why I was talking about a RedirectingLogHandler in discord |
@Fusezion file output would now have an INFO where there was none previously. |
Adds the `[Skript]` prefix to `Level.INFO`
default: | ||
levelType = " INFO"; | ||
} | ||
logWriter.println( "[" + SkriptConfig.formatDate(System.currentTimeMillis()) + levelType + "] " + message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just directly use logLevel
as the toString
will return the appropriate name. I am also a little concerned about the addition of the severity into the file since it's a breaking change. I think when people specify severity it will be specifically for the console log level because that actually has an impact on things. if they wanted it part of their file message, they could just prepend their message. we could disallow the file/severity combo in init :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well log
is basically just mimicking the console. It's like sending a message to console but in the form of a log file. so this part "I think when people specify severity it will be specifically for the console log level because that actually has an impact on things." I can see where you are coming from, but that just seems weird in my opinion. "if they wanted it part of their file message, they could just prepend their message. we could disallow the file/severity combo in init" by default this returns INFO
but I could just make it not return INFO. This should really be up for discussion in my honest opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think omitting INFO would be fine, avoids breaking changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im cool with omitting info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it may be useful to allow users to specifically request info
so the prefix can be used in a consistent manner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just going to omit info
. Info just seems useless to be honest. I feel like keeping warning and severe is better
Fixes a spacing issue
}) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}) | |
}) |
Description
Added ways to declare severity when logging
Target Minecraft Versions: any
Requirements: none
Related Issues: none