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

default and comments of logging.ConsoleHandler.level #2590

Open
jvaneck opened this issue Dec 12, 2018 · 5 comments
Open

default and comments of logging.ConsoleHandler.level #2590

jvaneck opened this issue Dec 12, 2018 · 5 comments

Comments

@jvaneck
Copy link

@jvaneck jvaneck commented Dec 12, 2018

Can someone please check and validate these lines of code as setting the value to "quiet" is not a valid option and returns back:
Bad level value for property: java.util.logging.ConsoleHandler.level
Can't set level for java.util.logging.ConsoleHandler

It doesn't make sense to mention "quiet" or "verbose" because neither of those are options listed on line 30 of this file: https://github.com/oracle/opengrok/blob/master/logging.properties

# Limit the message that are printed on the console to WARNING and above (default "quiet" mode).
# if verbose is set, then log INFO and above
java.util.logging.ConsoleHandler.level = WARNING
java.util.logging.ConsoleHandler.formatter = org.opengrok.indexer.logger.formatter.SimpleConsoleFormatter
@vladak
Copy link
Contributor

@vladak vladak commented Dec 12, 2018

What is meant in the comment is that setting the level to WARNING will make the logging somewhat quiet (as opposed to the lower log levels). The comment should be expanded in this sense.

@vladak
Copy link
Contributor

@vladak vladak commented Dec 12, 2018

Actually, the verbose probably means the Indexer flag that got changed in cset 83adc92

@cross
Copy link
Contributor

@cross cross commented Apr 26, 2019

On a related note, I found this issue (and #137) while looking for INFO output to console when indexing with -v.

Are we sure after [83adc92] that the -v argument still changes the log level to include INFO to the console? I have made some changes in PerforceRepository, and when the log() line I added uses WARNING, I see it. But, when I set it to INFO, I do not see it even when running with -v.

(I do, however, see Logging filehandler pattern: opengrok%g.%u.log in the console output, which I don't see when I don't add -v to the command line.)

Should I open a new issue for this, or am I missing something?

@cross
Copy link
Contributor

@cross cross commented Apr 29, 2019

Hmm. I think I figured this out. It turns out that I'm invoking my index with a wrapper script for command line tools. It is running the opengrok.jar with -Djava.util.logging.config.file=/opt/opengrok/doc/logging.properties, and it appears that config isn't overridden by the -v command-line arg. Not sure what the right thing is, but I can work past the issue I had now.

@vladak
Copy link
Contributor

@vladak vladak commented Apr 29, 2019

I think the -v option should just go away. I preserved it for compatibility with older versions originally. There should be just one way how to set logging levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.