LogManager.getLogger() uses reflection to determine the class name of the Logger. Reflection is not available on Android and leads to a crash. Passing a class parameter would fix that.
As far as I can tell that is the only change necessary to reach Android compatibility. I am currently using a patched version of Discovery as a dependency for Samba. For convenience I also change the Logger to be of SLF4J.
Here is an example how this could look like for passing a lambda: https://github.com/biafra23/discovery/blob/master/src/main/java/org/ethereum/beacon/discovery/pipeline/handler/IncomingDataPacker.java
IMHO only necessary for trace calls.
Would you consider accepting a PR that has either both changes or at least the parameter for getLogger()?
LogManager.getLogger()uses reflection to determine the class name of the Logger. Reflection is not available on Android and leads to a crash. Passing a class parameter would fix that.As far as I can tell that is the only change necessary to reach Android compatibility. I am currently using a patched version of Discovery as a dependency for Samba. For convenience I also change the Logger to be of SLF4J.
Here is an example how this could look like for passing a lambda: https://github.com/biafra23/discovery/blob/master/src/main/java/org/ethereum/beacon/discovery/pipeline/handler/IncomingDataPacker.java
IMHO only necessary for trace calls.
Would you consider accepting a PR that has either both changes or at least the parameter for
getLogger()?