An in-display logging library for Android 📲

Overview

Vlog

Vlog was featured in Android Weekly

An In-Display real-time logging Library for Android.
Vlog provides an easy and convenient way to access logs right on your phone.

Messenger chat like bubble is introduced to display logs in a non-intrusive manner. The bubble also shows the count badge to indicate the presence of logs. Along with that, basic filtering capability helps with finding specific logs,

Philosophy

Logs play a crucial part in diagnosing issues. Without proper logging, developers may have to spend countless hours debugging the root cause. When the codebase becomes huge, logs can also prove to be useful in understanding complex execution flows. Although one can argue to follow execution from one breakpoint to another, the whole process can be time-consuming. But for the most part, logs are an indispensable tool in any developer’s arsenal. More so for an android developer where there can be network failures, device permission denials, SQL errors, background thread issues, telemetry data inaccuracies, and innumerable other concerns. And Vlog takes it a step forward and helps in conveniently check logs right on your phone.

Getting Started

Gradle Dependency

Add maven source in root build.gradle:

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

Add the library dependency in build.gradle file. Notice the no-op version, an empty implementation, which ensures library is not added to the release builds:

dependencies {
 debugImplementation 'com.github.girish3.Vlog:library:v0.3'
 releaseImplementation 'com.github.girish3.Vlog:library-no-op:v0.3'
}

Basic Usage

The Vlog exposes easy-to-use APIs and has same logging methods as Android's Log utility ( Log.v, Log.d...)

", " ") // verbose log vlog.e(" ", " ") // error log // stop vlogging vlog.stop() // check if vlog is currently active vlog.isEnabled() // returns true if vlog.start() was called ">
val vlog = Vlog.getInstance(context) 
// In the above code, make sure to pass application context as an argument instead of Activity context

// start vlogging (the bubble will appear)
vlog.start()

vlog.v("
       
        "
       , "
       
        "
       ) // verbose log
vlog.e("
       
        "
       , "
       
        "
       ) // error log

// stop vlogging
vlog.stop()

// check if vlog is currently active
vlog.isEnabled() // returns true if vlog.start() was called

Integrate with Timber

Timber is a popular logging library. Timber is extensible therefore Vlog can be seamlessly integrated alongside Timber. Add a behavior through Tree instance and plant the instance by calling Timber.plant. For more details, check the timber sample module in this repo.

Advance Usage

Often, there is a need to not just print logs but also either to save them in a local file or upload it to a server. The Chain of responsibility pattern is a recommended pattern for such needs. In this pattern, each object in the chain receives the log data and can therefore be responsible to print the log statement (logcat), save in a file, or, in our use-case, pass the data to Vlog library. Refer sample app in this repo for more details. For a quick setup, the app's logger folder can directly be copy-pasted in any Android project.

Contribute

All types of contribution is accepted. Raise issues, suggest changes or submit a pull request.

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

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

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

AndroidLogger Android Library that makes debugging, log collection, filtering and analysis easier. Contains 2 modules: Logger: 'com.github.ShiftHackZ.

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

✔️ 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

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

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 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

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.

Display's information about SpaceX crew members and ships by consuming a rest api and storing the data to display when the user is offline.

Space-X App Display's information about SpaceX crew members(look for ‘Crew’ section in rest api docs) and ships (look for ‘Ships’ section in rest api

Trail is a simple logging system for Java and Android. Create logs using the same API and the library will detect automatically in which platform the code is running.

Trail Trail is a simple logging system for Java and Android. Create logs using the same API and the library will detect automatically in which platfor

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.

Extendable MVI framework for Kotlin Multiplatform with powerful debugging tools (logging and time travel), inspired by Badoo MVICore library
Extendable MVI framework for Kotlin Multiplatform with powerful debugging tools (logging and time travel), inspired by Badoo MVICore library

Should you have any questions or ideas please welcome to the Slack channel: #mvikotlin Inspiration This project is inspired by Badoo MVICore library.

SPIDlibraryAndroid is a library for logging in via SPID through several different identity providers.

SPIDlibraryAndroid SPIDlibraryAndroid is a library for logging in via SPID through several different identity providers.

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

📄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

📄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

Easy Android logging with Kotlin and Timber

Kotlin logging extensions for Timber Jake Wharton's Timber library is great. It's a Java library with an API that works well for Java, but that isn't

StaticLog - super lightweight static logging for Kotlin, Java and Android
StaticLog - super lightweight static logging for Kotlin, Java and Android

StaticLog StaticLog is a super lightweight logging library implemented in pure Kotlin (https://kotlinlang.org). It is designed to be used in Kotlin, J

Comments
  • 奔溃

    奔溃

    android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid service notification: Notification(channel=Vlog pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x40 color=0x00000000 category=service vis=PRIVATE) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2220) at android.os.Handler.dispatchMessage(Handler.java:109) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7555) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)

    opened by AnotherSkyBoy 2
  • Fixed issue of not removing 'motionTracker' when chatHead is removed

    Fixed issue of not removing 'motionTracker' when chatHead is removed

    Yesterday I found your project on a subreddit r/androiddev & was really impressed!

    I was looking through your code & was learning how you implemented Bubbles so I set some background coloring to the views you are adding to Window & found some strange behavior. Take a look over this sample video.

    Turns out you are not removing the instance of motionTracker upon chatHead is remove. This keeps the overlay even when the bubble is removed & makes the underlying screen untouchable.

    • This PR solves this issue.

    TBH, I'm still trying to understand how the Spring system & all is built from ground-up & plugged to WindowManager overall it's amazing to look at how you built this. Hope this contribution is worth your time :)

    opened by KaustubhPatange 1
  • Consider using Bubbles

    Consider using Bubbles

    The current implementation relies on the SYSTEM_ALERT_WINDOW and FOREGROUND_SERVICE permissions, which are quite intrusive (especially the first one). Since API 29, Android offers a proper Bubbles API. It might be interesting to switch to this API if available at runtime.

    enhancement 
    opened by Kernald 0
  • Consider renaming app_name

    Consider renaming app_name

    https://github.com/girish3/Vlog/blob/master/library/src/main/res/values/strings.xml defines a string resource app_name, which is common in apps (as it's part of the default Android Studio template). Consider renaming it to to something more specific to avoid potential conflicts when merging resources.

    enhancement 
    opened by Kernald 0
Releases(v0.4)
Owner
girish budhwani
Android@Microsoft
girish budhwani
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
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

Tabasumu 6 Aug 26, 2022
📄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

Tony Trinh 1.1k Jan 5, 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
Annotation-triggered method call logging for your debug builds.

Hugo Annotation-triggered method call logging for your debug builds. As a programmer, you often add log statements to print method calls, their argume

Jake Wharton 7.9k Dec 31, 2022
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 demonstration of Kotlin-logging with logback.

try-kotlin-logging A demonstration of Kotlin-logging with logback. Usage # output a log to STDOUT and file(myApp.log) $ ./gradlew run # => 2021-12-11

Hayato Tachikawa 1 Dec 13, 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
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
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.

Abolfazl Abbasi 12 Aug 23, 2022