-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add option to completely disable to BOY console; prints to log instead #7
Conversation
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.
This works to stop the logging to the console but there is now no record of the error at all. When run from eclipse you can see the error in the IDE console but it's not present in the isis.log
file or in the Help->Console Log
. I think it needs to be in at least one of these so that we can diagnose issues on instruments.
I think the way it's implemented could be a bit cleaner. At the least we could use the existing case statements as I've mentioned in the comments. Ideally I think we should implement a new ConsoleServiceSSHelper
with the new behaviour and change which one we use. But having looked at the code the loading in is done using reflection so I don't think that that will be easy?
...org.csstudio.opibuilder.rcp/src/org/csstudio/opibuilder/util/ConsoleServiceSSHelperImpl.java
Outdated
Show resolved
Hide resolved
...org.csstudio.opibuilder.rcp/src/org/csstudio/opibuilder/util/ConsoleServiceSSHelperImpl.java
Outdated
Show resolved
Hide resolved
...org.csstudio.opibuilder.rcp/src/org/csstudio/opibuilder/util/ConsoleServiceSSHelperImpl.java
Outdated
Show resolved
Hide resolved
The logging is now passed from I did look at implementing an alternative to I've fixed the code comments. |
switch (PreferencesHelper.getConsolePopupLevel()) { | ||
case ALL: | ||
popConsoleView(); | ||
break; | ||
case NO_CONSOLE: | ||
OPIBuilderPlugin.getLogger().log(Level.WARNING, 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.
OPIBuilderPlugin.getLogger().log(Level.WARNING, message); | |
OPIBuilderPlugin.getLogger().log(Level.ERROR, 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.
I agree that this would be nice, but unfortunately it doesn't compile as ERROR
isn't a valid errorlevel. WARNING
felt like the most appropriate from this list: https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html. We could use SEVERE
but that doesn't exist in log4j world so would get logged as INFO
anyway - I preferred to stick with levels that exist in both...
ISISComputingGroup/IBEX#5302