Library that makes debugging, log collection, filtering and analysis easier.

Overview

AndroidLogger

Android Library that makes debugging, log collection, filtering and analysis easier.

Contains 2 modules:

  • Logger: 'com.github.ShiftHackZ.AndroidLogger:logger:1.0'
  • LoggerKit: 'com.github.ShiftHackZ.AndroidLogger:logger-kit:1.0' (optional)

Logger

Core Logger library which implements main logic of log collecting and log processing mechanisms.

Implementation

  1. In project-level gradle add new maven repository:
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  1. In app-level gradle add new implementation:
dependencies {
    implementation 'com.github.ShiftHackZ.AndroidLogger:logger:1.0'
}

Components

  • Logger: main component for configuration and log collecting;
  • LoggerPrinter: interface that describes log output contract;
  • LoggerMiddleware: interface that describes log processing.

Usage example

  1. Optional: Implement some class that extends from LoggerMiddleware interface (see this example);

  2. Add your middleware during runtime. It is recommended to do this in onCreate() method of your main Application class.

class LoggerApp : Application() {

    override fun onCreate() {
        super.onCreate()
        Logger.addMiddleware(LoggerNetworkMiddleware(this))
    }
}
  1. Collect logs like usual, by using Logger static methods (instead of system Log methods).
class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        Logger.d(this::class, "onCreate", "Hello World!")
    }
}

LoggerKit

Extra LoggerKit library, which depends on Logger core library, and adds much more functionality to logger.

It is not necessary to use LoggerKit, you may use just Logger core library with your custom LoggerMiddleware.

Implementation

In app-level gradle add implementation:

dependencies {
    implementation 'com.github.ShiftHackZ.AndroidLogger:logger-kit:1.0'
}

There is no need to implement Logger core 'com.github.ShiftHackZ.AndroidLogger:logger', it will be included by gradle automatically.

Components

  • LoggerKit: main component of Kit library, extends functionality of Logger, duplicates some of it's methods for configuration;
  • DatabaseLoggerMiddleware: built in middleware that collects logs and saves entries in local database;
  • Also LoggerKit contains view components which allows to view and manage logs during runtime.

Screenshots

Usage example

  1. Optional: Implement some class that extends from LoggerMiddleware interface (see this example);

  2. Initialize LoggerKit, if needed add your middleware. LoggerKit must be initialized in onCreate() method of your main Application class.

class LoggerApp : Application() {

    override fun onCreate() {
        super.onCreate()
        LoggerKit.addMiddleware(LoggerNetworkMiddleware(this))
            .initialize(this)
    }
}
  1. Collect logs like usual, by using Logger static methods (instead of system Log methods).
class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        Logger.d(this::class, "onCreate", "Hello World!")
    }
}
  1. You can view your logs by calling LoggerKit.openLogViewer() during runtime.
class SettingsActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding.btnLogs.setOnClickListener {
            LoggerKit.openLogViewer()
        }
    }
}

Credits

You might also like...
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.

Jambo is an open source remote logging library
Jambo is an open source remote logging library

Jambo Jambo is an open source remote logging library. For those who would like to see their logs remotely on their android device Jambo is the library

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

✔️ Simple, pretty and powerful logger for android
✔️ Simple, pretty and powerful logger for android

Logger Simple, pretty and powerful logger for android Setup Download implementation 'com.orhanobut:logger:2.2.0' Initialize Logger.addLogAdapter(new A

📄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

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

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

A library for debugging android databases and shared preferences - Make Debugging Great Again
A library for debugging android databases and shared preferences - Make Debugging Great Again

Android Debug Database Android Debug Database is a powerful library for debugging databases and shared preferences in Android applications Android Deb

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

Android Resource Manager application to manage and analysis your app resources with many features like image resize, Color, Dimens and code Analysis
Android Resource Manager application to manage and analysis your app resources with many features like image resize, Color, Dimens and code Analysis

Android Resource Manager application to manage and analysis your app resources with many features like image resize, Color, Dimens and code Analysis

Easier RxJava2 debugging with better stacktraces
Easier RxJava2 debugging with better stacktraces

Traceur Traceur enables easier debugging of RxJava2 exceptions, by appending the source of any asynchronous calls to the original exception. An exampl

A basic application demonstrating IPFS for collaborative data analysis, from the perspective of a Data Analysis Provider.

Spacebox A basic application demonstrating IPFS for collaborative data analysis, from the perspective of a Data Analysis Provider. Description This pr

Powerful event-bus optimized for high throughput in multi-threaded applications. Features: Sync and Async event publication, weak/strong references, event filtering, annotation driven
Powerful event-bus optimized for high throughput in multi-threaded applications. Features: Sync and Async event publication, weak/strong references, event filtering, annotation driven

MBassador MBassador is a light-weight, high-performance event bus implementing the publish subscribe pattern. It is designed for ease of use and aims

EduApp is a mini e-learning platform based on udemy's public api. It has 4 main navigation destinations (Home, Search, Wishlist, Cart). Users can search courses from different categories and get real-time results from the api using Chips for a smooth filtering experience. It has different theme for dark mode. This is a project designed to help controlling Android MediaPlayer class. It makes it easier to use MediaPlayer ListView and RecyclerView. Also it tracks the most visible item in scrolling list. When new item in the list become the most visible, this library gives an API to track it.
GreenDroid is a development library for the Android platform. It makes UI developments easier and consistent through your applications.

#GreenDroid Foreword : This project, initially initiated by me, Cyril Mottier, is not maintained anymore and can be considered as deprecated. As a con

Stateful is a Kotlin library which makes Android application development faster and easier.

Stateful Stateful is a Kotlin library which makes Android application development faster and easier. It helps you delete all the boilerplate code for

Volley is an HTTP library that makes networking for Android apps easier and, most importantly, faster.

Volley Volley is an HTTP library that makes networking for Android apps easier and, most importantly, faster. For more information about Volley and ho

NodeFlow is a library that makes visualizing hierarchical content easier.
NodeFlow is a library that makes visualizing hierarchical content easier.

NodeFlow NodeFlow is an Android library that provides a simple way to visualize hierarchical content. Perfect for displaying items that are organized

Releases(1.0)
Owner
ShiftHackZ
Middle Android Developer
ShiftHackZ
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.

Taylan Sabırcan 54 Nov 29, 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
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
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

Jake Wharton 9.9k Jan 8, 2023
Kermit is a Kotlin Multiplatform logging utility with composable log outputs

Kermit is a Kotlin Multiplatform logging utility with composable log outputs. The library provides prebuilt loggers for outputting to platform logging tools such as Logcat and NSLog.

Touchlab 395 Jan 4, 2023
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.

Square 849 Dec 23, 2022
Kotlin multi-platform logging library with structured logging and coroutines support

Klogging Klogging is a pure-Kotlin logging library that aims to be flexible and easy to use. It uses Kotlin idioms for creating loggers and sending lo

Klogging 51 Dec 20, 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
This is an Kotlin Library that enables Annotation-triggered method call logging for Kotlin Multiplatform.

This is an Kotlin Library that enables Annotation-triggered method call logging for Kotlin Multiplatform.

Jens Klingenberg 187 Dec 18, 2022
An in-display logging library for Android 📲

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

girish budhwani 121 Dec 26, 2022