Skip to content

Android compatibility - Crash in LogManager.getLogger() #194

@biafra23

Description

@biafra23

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()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions