EasyLog

A dev-tool Log for Android. ( Fork Hugo )

Introduction

EasyLog help you log easily, it will calculate time of method.

@Loga
public void getData {
  // do sth
}

The Loga annotation support the java method.

@Loga(level = Level.DEBUG, printArgs = true)
public void getData {
  // do sth
}

Loga can support to log in different level. You can also choose to print arguments of method.

Use annotations to describe the log info:

  • Log level
  • Arguments of method

API Declaration

Annotations on the methods and use logutil indicate how a log will be handled.

Log Method

Method have an EasyLog annotation that provides the info to log.

@Loga

You can also specify parameters in the annotation.

@Loga(level = Level.DEBUG, printArgs = true)

Log util

You can also use EasyLog utils to log where you want.

Logi.d(KEY, VALUE);
Logi.d(VALUE);

Download

Latest JAR

The source code to the EasyLog, its samples, and this website is available on GitHub.

Maven

<dependency>
  <groupId>com.ucsunup.easylog</groupId>
  <artifactId>easylog-plugin</artifactId>
  <version>(insert latest version)</version>
</dependency>

Gradle

buildscript {
  repositories {
    mavenCentral()
  }

  dependencies {
    classpath 'com.ucsunup.easylog:easylog-plugin:(insert latest version)'
  }
}

apply plugin: 'com.android.application'
apply plugin: 'com.ucsunup.easylog'

EasyLog requires at minimum Java 7 or Android 2.3.

ProGuard

If you are using ProGuard in your project add the following lines to your configuration:

# EasyLog used when running on Java 8 VMs. Will be used at runtime.
-dontwarn easylog$Java8

Contributing

If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request.

When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also make sure your code compiles by running mvn clean verify.

License

Copyright 2018 ucsunup.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.