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

Optional SLF4J support without adding compile time dependency #1341

Closed
wants to merge 2 commits into from

Conversation

BrynCooke
Copy link

Hi,
I know this has been discussed (and rejected) before, but I am hoping that this solution can satisfy everyone.

#95

This change adds a an optional runtime dependency on SLF4J. If SLF4J is detected at runtime then it is used, otherwise logging is delegated to java util logging.

In addition if orientdb was to ever be run on android then this mechanism could be used to swap in the android logger...

This code modification doesn't add SLF4J as a dependency by default as the scope is specified as 'provided'.

@mproch
Copy link
Contributor

mproch commented Feb 26, 2013

I think it would be really helpful to be able to log via slf4j. However I would rather provide some autodiscovery mechanism - maybe via configuration. So that we would have OLoggerImplClass configuration property, if not set orientDB will use current implementation, This way there wouldn't be any dependency on slf4j (btw - I think it should be optional not provided) and it would be fully customizable

@pellyadolfo
Copy link
Contributor

My +1 for an optional decoupled pluggable logging mechanism.

Would there be any performance issue by increasing the number of log lines in OrientDB code? Something as having an optional DEBUG OrientDB (by configuration) to help identifying the root cause of exceptions. This is something I really miss as most of exceptions are hidden or wrapped by other exceptions and only by adding System.out, recompiling and redeploying can be tracked on production, which is a painful mechanism. Otherwise you are almost blind. I think it could help a lot also to confirm that every OrientDB module does what is expected to do. Or, at least, in some specific key parts of the code.

Does anyone has an estimation on impact in performance? (I am aware that performance is key for a database engine).

@bademux
Copy link
Contributor

bademux commented Sep 6, 2013

+1 Nice to have on API level (ex. JPA Provider) and tests

@cthiebault
Copy link
Contributor

+1 for slf4j and more log messages

@srgg
Copy link

srgg commented Jul 17, 2014

@lvca

It might be really helpful. Do you have any objections which prevents merging this?

@lvca
Copy link
Member

lvca commented Jul 17, 2014

@BrynCooke please could you send this PR to "develop" branch? We use "master" only for releases.

@srgg
Copy link

srgg commented Jul 17, 2014

@BrynCooke it will be great if you update slf4j version in dependency to the latest one

@srgg
Copy link

srgg commented Jul 22, 2014

@lvca

Since @BrynCooke is not responding, I've rebased his changes and created a new PR #2602 as you requested

@lvca
Copy link
Member

lvca commented Jul 22, 2014

Ok, I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants