Simple Logger for Android

Overview

EzyLogger-Android

Simple Logger for Android

Donate

Gradle

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
    }
}

dependencies {
    compile 'com.github.afiqiqmal:EzyLogger:1.1.0'
}

Maven

<dependency>
	<groupId>com.github.afiqiqmal</groupId>
	<artifactId>EzyLogger</artifactId>
	<version>1.1.0</version>
</dependency>

How to use:

Init Logger

Use in Activity

public class BaseActivtiy extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //inline initialize
        new Logger.Builder(this).setTag("testing").enableLog(true).create();

        //short initialize
        Logger.init(this);               // Optional if you dont use Logger Toast
        Logger.initTag(this,"testing");  // default is 'EzyLogger'
        Logger.initTag("testing");       // default is 'EzyLogger'
        Logger.canShowLog(true);         // default is True
    }
}    

Logger use

//info log
Logger.info(TAG,"message"); // can set TAG here if not using initTag
Logger.info("message");
Logger.info(Object);
Logger.info(Object,Format); // JSON, XML,LIST, MAP, BUNDLE, STRING, INTENT, ARRAY

Logger.debug(...);
Logger.warn(...);
Logger.error(...);
Logger.verbose(...);
Logger.wtf(...);

//EXAMPLE OF USE

List<?> users = new ArrayList<>();
Bundle bundle = new Bundle();
Map<String,?> map = new LinkedHashMap<>();
Intent intent = new Intent();

Logger.info("message");
Logger.info(0);
Logger.info(new String[]{"test","world","hello"});
Logger.info(new int[]{0,1,2,3,4});
Logger.info(true);

Logger.info(users);
Logger.info(bundle);
Logger.info(map);
Logger.info(intent);

Logger.info(JSON_STRING,Format.JSON);
Logger.info(XML_STRING,Format.XML);
Logger.info(users,Format.LIST);
Logger.info(bundle,Format.BUNDLE);
Logger.info(map,Format.MAP);
Logger.info(intent,Format.INTENT);
Logger.info("message",Format.STRING);
Logger.info(new String[]{"array","1","2"},Format.ARRAY);

Use Logger for showing Toast

// Logger.init(this) is needed 
Logger.shortToast(MESSAGE);
Logger.longToast(MESSAGE);

Extra Logger if you need to list all the values in SharedPreferences

//init
Logger.init(this) //needed if not init yet

//will log all the prefs in the default Prefs
new Logger.Preference().printAllSharedPref();

//log all the prefs in the selected Prefs
new Logger.Preference().whichPrefDBName(PREF_NAME).printAllSharedPref();

//log the value by the key
new Logger.Preference().printSharedPrefByKey(KEY);



//OR can do like this
Logger.Preference pref = new Logger.Preference();
pref.whichPrefDBName(PREF_NAME);
pref.printAllSharedPref();
pref.printSharedPrefByKey(KEY);

###License

Copyright 2017 HAFIQ IQMAL

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.

You might also like...
Example application using Bugfender SDK in Android
Example application using Bugfender SDK in Android

Bugfender Android SDK SDK Installation Here are the main points to getting Bugfender working on your apps: Get an app key at bugfender.com Add Bugfend

📄The reliable, generic, fast and flexible logging framework for Android
📄The reliable, generic, fast and flexible logging framework for Android

logback-android v2.0.0 Overview logback-android brings the power of logback to Android. This library provides a highly configurable logging framework

Gadget is a library that makes analytics tracking easier for android apps

gadget (In RC Stage) Gadget is a library that makes analytics tracking easier for android apps.

An in-display logging library for Android 📲
An in-display logging library for Android 📲

Vlog provides an easy and convenient way to access logs right on your phone.

A tiny Kotlin API for cheap logging on top of Android's normal Log class.
A tiny Kotlin API for cheap logging on top of Android's normal Log class.

A tiny Kotlin API for cheap logging on top of Android's normal Log class.

FileLogger - a library for saving logs on Files with custom-formatter on background I/O threads, mobile-ready, android compatible,

The FileLogger is a library for saving logs on Files with custom-formatter on background I/O threads, mobile-ready, android compatible, powered by Java Time library for Android.

An easy way to customize your log in Android,including output to console, writing log to file in high performance way and so on

EasyLog An easy way to customize your log in Android,including output to console, writing log to file in high performance way and so on. 1. Initializa

A logger with a small, extensible API which provides utility on top of Android's normal Log class.
A logger with a small, extensible API which provides utility on top of Android's normal Log class.

This is a logger with a small, extensible API which provides utility on top of Android's normal Log class. I copy this class into all the little apps

A logger with a small, extensible API which provides utility on top of Android's normal Log class.
A logger with a small, extensible API which provides utility on top of Android's normal Log class.

This is a logger with a small, extensible API which provides utility on top of Android's normal Log class. I copy this class into all the little apps

Kotlin Multi Platform Logger, for android an ios : Logcat & print

Multiplatform Preferences Use a single object : Logger in your kotlin shared projects to display logs Note you can also use it in your real code on An

An OkHttp interceptor which has pretty logger for request and response. +Mock support
An OkHttp interceptor which has pretty logger for request and response. +Mock support

LoggingInterceptor - Interceptor for OkHttp3 with pretty logger Usage val client = OkHttpClient.Builder() client.addInterceptor(LoggingInterceptor

Utility logger library for storing logs into database and push them to remote server for debugging
Utility logger library for storing logs into database and push them to remote server for debugging

HyperLog Android Overview Log format Download Initialize Usage Get Logs in a File Push Logs Files to Remote Server Sample Testing Endpoint using Reque

Logger
Logger

StreamingAndroidLogger Introduction Convenient logger that adds support to having multiple different loggers and different log levels for each one of

Timber + Logger Integration. Make Logcat Prettier, show thread information and more.
Timber + Logger Integration. Make Logcat Prettier, show thread information and more.

Pretty Timber Android Logcat Timber + Logger Integration Video Instructions: https://youtu.be/zoS_i8VshCk Code App.kt class App : Application() {

Napier is a logger library for Kotlin Multiplatform.
Napier is a logger library for Kotlin Multiplatform.

Napier is a logger library for Kotlin Multiplatform. It supports for the android, ios, jvm, js. Logs written in common module are displayed on logger

Yakl - Yet Another Kotlin Logger

YAKL Yet Another Kotlin Logger. Motivation Current jvm loggers have some disadva

Pluto Logger is a Pluto plugin to manage and share your Debug logs

Pluto Logger Plugin Pluto Logger is a Pluto plugin to manage and share your Debug logs. It also comes with Timber support. 🖇 Integrate plugin in your

Simple-Claim-Form - Android App for creating a simple dynamic form with MVVM architecture

Simple-Claim-Form Android App for creating a simple dynamic form with MVVM archi

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.
Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Releases(1.1.0)
Owner
Hafiq
Android | Laravel | NuxtJs | Senior Software Engineer
Hafiq
Kotlin Multi Platform Logger, for android an ios : Logcat & print

Multiplatform Preferences Use a single object : Logger in your kotlin shared projects to display logs Note you can also use it in your real code on An

Florent CHAMPIGNY 49 Aug 22, 2022
An OkHttp interceptor which has pretty logger for request and response. +Mock support

LoggingInterceptor - Interceptor for OkHttp3 with pretty logger Usage val client = OkHttpClient.Builder() client.addInterceptor(LoggingInterceptor

ihsan BAL 1.3k Dec 26, 2022
Utility logger library for storing logs into database and push them to remote server for debugging

HyperLog Android Overview Log format Download Initialize Usage Get Logs in a File Push Logs Files to Remote Server Sample Testing Endpoint using Reque

HyperTrack 675 Nov 14, 2022
Logger

StreamingAndroidLogger Introduction Convenient logger that adds support to having multiple different loggers and different log levels for each one of

Jan Rabe 46 Nov 29, 2022
Timber + Logger Integration. Make Logcat Prettier, show thread information and more.

Pretty Timber Android Logcat Timber + Logger Integration Video Instructions: https://youtu.be/zoS_i8VshCk Code App.kt class App : Application() {

Awesome Dev Notes | Android Dev Notes YouTube 29 Jun 6, 2022
Napier is a logger library for Kotlin Multiplatform.

Napier is a logger library for Kotlin Multiplatform. It supports for the android, ios, jvm, js. Logs written in common module are displayed on logger

Akira Aratani 457 Jan 7, 2023
Yakl - Yet Another Kotlin Logger

YAKL Yet Another Kotlin Logger. Motivation Current jvm loggers have some disadva

Mark Kosichkin 4 Jan 19, 2022
Pluto Logger is a Pluto plugin to manage and share your Debug logs

Pluto Logger Plugin Pluto Logger is a Pluto plugin to manage and share your Debug logs. It also comes with Timber support. ?? Integrate plugin in your

Pluto 1 Feb 8, 2022
Simple application to log your mood through the day and explain feature flags.

Mood Logger App (Android version) This Repo This repository contains code for building a very basic application to log your mood through the days. The

MongoDB Developer Relations 3 Oct 24, 2021
simple Kotlin logging: colorized logs for Kotlin on the JVM

sklog - simple Kotlin logging Kotlin (JVM) logging library for printing colorized text to the console, with an easy upgrade path to the popular kotlin

null 1 Jul 26, 2022