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

Overview

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 Android & iOs

Compatible with kotlin android and kotlin native for iphone

class MyPresenter {
    
    val TAG = "MyPresenter"

    fun start(){
        Logger.d(TAG, "my message")
        
        try{
            //myMethod
        } catch(e: Throwable){
            Logger.e(TAG, e.message, e)
        }
    }
}

Download

Add the repository

repositories {
    maven { url  "https://dl.bintray.com/florent37/maven" }
}

common

Download

implementation "com.github.florent37:multiplatform-log:1.5.0"

ios

Uses inside the Console / print

Download

implementation "com.github.florent37:multiplatform-log-ios:1.5.0"

android

Uses inside the Logcat

Download

implementation "com.github.florent37:multiplatform-log-android:1.5.0"

Disable logs on release

Enable the logger just on debug :

Logger.enabled = BuildConfig.DEBUG

Loggin methods

Debug

Log.d(TAG, message)

Error

Log.e(TAG, message, throwable)

License

Copyright 2018 Florent37

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...
simple Kotlin logging: colorized logs for Kotlin on the JVM
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

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.

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.

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

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.

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.

Comments
  • Incompatible Kotlin/Native libraries: Needs version compatible with Kotlin/Native 1.3.61

    Incompatible Kotlin/Native libraries: Needs version compatible with Kotlin/Native 1.3.61

    On gradle sync I'm getting:

    Incompatible Kotlin/Native libraries:
    There is a third-party library attached to the project that was compiled with an older Kotlin/Native
     compiler and can't be read in IDE: 
    Gradle: com.github.florent37:multiplatform-log-ios_debug_ios_x64:klib:1.0.1  Please edit Gradle 
    buildfile(s) and specify library version compatible with Kotlin/Native 1.3.61. Then re-import the project in IDE.
    

    I see that version 1.0.2 is using kotlin 1.3.61 Was the v1.0.2 uploaded to maven?

    opened by ArthurBrum 1
  • Misspelled github in gradle download instructions

    Misspelled github in gradle download instructions

    implementation "com.gitub.florent37:multiplatform-log-android:1.0.0" There's an "H" missing in "github" there so the dependency doesn't resolve :).

    Also, it's not clear which version is to prefer. 0.0.9 or 1.0.0? The README gives conflicting instructions.

    great and useful library btw 👍

    opened by einarvalgeirsson 0
  • Logger class is not available in 1.0.5

    Logger class is not available in 1.0.5

    I add the 1.0.5 library, but the Logger class is not available to import there. I cannot see the library in my External Libraries list.

    With 1.0.1 it imports, but then iOS build fails with:

    > Task :shared:compileKotlinIosArm64 FAILED
    e: shared/Greeting.kt: (3, 12): Unresolved reference: github
    e: shared/Greeting.kt: (8, 9): Unresolved reference: Logger
    
    opened by tonisives 0
Owner
Florent CHAMPIGNY
Florent CHAMPIGNY
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
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
✔️ 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

Orhan Obut 13.5k Dec 30, 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
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
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
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