Skip to content

%caller and %source do not work properly with slf4j #44

Description

@almilli

When using the SLF4J bindings, both %caller and %source always results in AndroidLoggerAdapter as the caller/source instead of the actual class that the SLF4J log call was done in.

#android-logger.properties file
logger.com.example=DEBUG:Example:[%t] %caller{-3.-15}%source
//SLF4J test
private static final Logger log = LoggerFactory.getLogger(MainActivity.class);

public void doTest() {
    log.info("Testing");
}
05-19 09:23:45.129 736-804/com.example.activity D/Syncronous: [main] AndroidLoggerAdapter#log:55(AndroidLoggerAdapter.java:55) Testing

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