-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Logging #940
Comments
Issues to solve:
|
Since BaseX usage can not (and maybe better should not) predicted (lib vs tool vs dbms...), I propose adding hooks or annotations so it would be possible to introduce such functionality on another level. E.g. aspectj could be one way of allowing different "flavors". |
Rergarding the .logs directory in the GUI, i wonder why there are no entries appearing when execution a (HTTP) query? is there anything to set? |
I don't really see why some BaseX applications should write to the console: BaseX is not a small command-line tool. Are there other tools that depend on this console output? Using System.err/out is discouraged, except of course for pure command-line tools. Would anyone really need console output, Log4J (and probably other loggers as well) can be configured to log to standard error/output. The opposite, redirecting System.err/out to a logger, is possible also, so it's not a big deal and it's quite understandable if BaseX developers find more interesting issues to tackle ;-) It looks like System.err/out is only used in org.basex.util.Util, in 2 places, so I can propose a patch if you are interested. My problem with BaseX writing to System.err is that a BaseX message is sometimes output in the middle of a log message when the logger outputs to the console. Context: BaseXServer embedded in a Java application, running as a JUnit unit test within Eclipse. I suppose it would not be a problem in a real application. |
Hi @BenoitMaisonny, thanks for your offer; pull requests are always welcome. I guess one challenge will be to preserve the CLI features of BaseX (i.e. to decide when output to stdout is appropriate and when not). |
Send
stdout
andstderr
output to loggers, such as Log4J. If no loggers are found, output should stay as is.The text was updated successfully, but these errors were encountered: