danielgek / nativescript-sentry

Sentry java/cocoa for nativescript
Apache License 2.0
27 stars 30 forks source link

LF4J: Failed to load class #12

Closed mikloshumli closed 6 years ago

mikloshumli commented 6 years ago

Hi, I get this error when I probe implement sentry plugin. Please help me what can I do? My project Nativescript Angular tns version 3.4.2 I try android genymotion Virtual device Thnx Miklos

System.err: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
System.err: SLF4J: Defaulting to no-operation (NOP) logger implementation
System.err: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ANGULAR BOOTSTRAP DONE. 2607
bradmartin commented 6 years ago

This is coming from something in the sentry SDK, I haven't investigated it entirely to find where/why it throws. It happens with several of the android Sentry API methods. Will report with confirmation when I know for sure 👍

danielgek commented 6 years ago

this exeption is ok, because LF4J is optional on sentry java

bufke commented 5 years ago

One workaround is to add the optional dependency. In your app.gradle just add under dependencies

compile 'org.slf4j:slf4j-android:1.7.24'

That seems to get rid of the error. I realize it may not cause harm - but I get so many errors in Nativescript I'd rather not have an ever-growing list of "ok" errors that should be ignored. Perhaps the readme should be updated to explain this optional dependency and leave it up to the user if they want to add it.

bradmartin commented 5 years ago

@bufke - I've done some test builds and it appears the dep

compile 'org.slf4j:slf4j-nop:1.7.25'

will also get rid of the error and it's 3kb vs 7kb (jar size). Not a huge diff 😄 but some people might think so.

Adding to readme now in a PR