2

I try to use tinylog 2.0 on android, and I have a problem. Logger prints that error:

LOGGER WARN: No logging framework implementation found in classpath. Add tinylog-impl.jar for outputting log entries.

But in gradle file I have

implementation 'org.tinylog:tinylog-api:2.0.0-M3'
implementation 'org.tinylog:tinylog-impl:2.0.0-M3'

I don't use proguard, and flag minifyEnabled is false in Gradle

I found out that application can't load classes, because it can't find them. I don't understand, why classes are not in APK file

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Dmitriy
  • 133
  • 4

1 Answers1

4

In tinylog 2.0.0-M3, there was a bug that caused a wrong class loader to be used for loading tinylog's service files. This bug was reported in another context as issue #96 and is fixed with tinylog 2.0.0-M4.

Just update your dependencies:

implementation 'org.tinylog:tinylog-api:2.0.0-M4'
implementation 'org.tinylog:tinylog-impl:2.0.0-M4'
Martin
  • 598
  • 1
  • 4
  • 27
  • Thanks for your reply. Its working now. Is there any way to set the file path dynamically? – Kameswari Nov 13 '19 at 04:59
  • 1
    @Kameswari Yes, you can set the path to tinylog.properties via the system property "tinylog.configuration" or load any configuration dynamically via tinylog's Configuration class. – Martin Nov 13 '19 at 09:25