Giter Club home page Giter Club logo

log-mapping-processor's Introduction

Log Mapping Processor

Download

Log Mapping Processor is an open-source library to obfuscate and transform log constant code like Proguard

sample

Getting started

  1. Adjust your log code like: Log.java
  2. run Log Mapping Processor
    java -jar log-mapping.jar \
        --input-dir <path_to_your_java_project_source> \
        --output-dir <path_to_processed_source_output> \
        --mapping-file <path_to_mapping_file_output> \
        --log-keyword net.xdow.Log.debug \
        --log-keyword net.xdow.Log.error
  3. Unmapping your mapping.txt using Log Mapping Reverse

Compiling

To compile Log Mapping Processor, you need a Java Development Kit 1.8 (JDK8)

git clone https://github.com/eritpchy/log-mapping-processor
cd log-mapping-processor
./gradlew jar

Usage as library

Gradle:

implementation 'net.xdow:log-mapping:1.0.7'

Maven:

<dependency>
    <groupId>net.xdow</groupId>
    <artifactId>log-mapping</artifactId>
    <version>1.0.7</version>
</dependency>

Java:

Launcher.main(new String[]{
        "-v",
        "--input-dir", "<path_to_your_java_project_source>",
        "--output-dir", "<path_to_processed_source_output>",
        "--mapping-file", "<path_to_mapping_file_output>",
        "--log-keyword", "net.xdow.Log.debug",
        "--log-keyword", "net.xdow.Log.error",
});

Code example: TestMain.java

Notice

  • Log format like "Log.error(...)" is supported
  • Log format like "Log.error("arg1:{} arg2:{}", arg1, arg2, ...)" is NOT supported

References

log-mapping-processor's People

Contributors

eritpchy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.