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

Overview

✏️ Cabret ✏️

jCenter PRs Welcome jCenter

Introduction 🙋‍♂️ 🙋‍

This is an Kotlin Library that enables Annotation-triggered method call logging for Kotlin Multiplatform. Inspired by Hugo, Hunter-Debug and the blog posts by bnorm .

Simply add @DebugLog to your methods and it will automatically log all arguments that are passed to the function the return value and the time the function needed to excecute.

When the following function gets called:

@DebugLog
fun exampleFun(
    first: String,
    last: String,
    age: Int = 31,
    isLoggedIn: Boolean = false
): String = "$first $last"

fun main(){
  exampleFun("Jens","Klingenberg")
}

It will automatically log:

Example -> exampleFun( first= Jens, last= Klingenberg, age= 31, isLoggedIn= false)
Example <- exampleFun() [2.63ms] =  Jens Klingenberg

Show some ❤️ and star the repo to support the project

GitHub stars GitHub forks GitHub watchers Twitter Follow

Setup

You can take a look at DemoProject as an example

1) Gradle Plugin

Add the dependency to your buildscript

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "de.jensklingenberg.cabret:cabret-gradle:1.0.3"
    }
}

2) Apply the plugin

Kotlin DSL:

{ enabled = true version = "1.0.4" } ">
plugins {
     id("de.jensklingenberg.cabret")
}

configure<de.jensklingenberg.gradle.CabretGradleExtension> {
    enabled = true
    version = "1.0.4"
}

Groovy DSL:

plugins {
    id 'de.jensklingenberg.cabret'
}

cabret {
    enabled = true
    version = 1.0.4
}

The plugin will only be active when enabled is set to true

3) Log Library

To be able to use the DebugLog annotation, you also need add the dependecies on cabret-log.

Multiplatform (Common, JS, Native)

You can add dependency to the right to the common source set:

commonMain {
    dependencies {
        implementation "de.jensklingenberg.cabret:cabret-log:1.0.4"
    }
}

Platform-specific

You can also add platform-specific dependecies

sourceSets {
    jvmMain {
            dependencies {
                 implementation "de.jensklingenberg.cabret:cabret-log-jvm:1.0.4"
            }
   }
}

Here's a list of all available targets:

def cabretVersion = "1.0.4"

implementation "de.jensklingenberg.cabret:cabret-log-jvm:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-js:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-android:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-iosx64:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-iosarm64:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-linux:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-macos:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-watchosarm32:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-watchosarm64:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-tvosarm32:$cabretVersion"
implementation "de.jensklingenberg.cabret:cabret-log-tvosarm64:$cabretVersion"

4) Enable IR

Cabret is using a Kotlin Compiler Plugin that is using the IR Backend. For Native targets it's already enabled, but you need to activate it in your build.gradle for Kotlin JVM/JS

Kotlin/JVM
tasks.withType<KotlinCompile>().configureEach {
  kotlinOptions {
    useIR = true
  }
}
Kotlin/JS
target {
  js(IR) {
  }
}

Logging

Tag

@DebugLog( tag = "MyTag")

You can add a tag to the DebugLog annotation under which you can find your logged data. When you don't add a custom tag, Cabret will use the file name for top level function and the class name for class functions as the tag.

LogLevel

@DebugLog(logLevel = Cabret.LogLevel.ERROR)

You can set a LogLevel to the DebugLog Annotation. You can choose between VERBOSE, DEBUG, INFO, WARN or ERROR. By default DEBUG is selected.

Custom Logger

By default Cabret will log the data with printLn() or on Android with android.util.Log and the selected LogLevel. E.g. LogLevel.ERROR will be logged with Log.e(), LogLevel.INFO will be logged with Log.i(), etc.

You can add your own Logger. All you need to do is to add your object of Cabret.Logger to Cabret.addLogger() somewhere at the beginning of your programm.

Cabret.addLogger(object : Cabret.Logger {
            override fun log(data: LogData) {
                //Add your logger here
                println(data.tag + " " + data.msg)
            }
})

👷 Project Structure

  • cabret-compiler-plugin - This module contains the Kotlin Compiler Plugin for JVM/JS targets
  • cabret-compiler-native-plugin - This module contains the Kotlin Compiler Plugin for native targets
  • cabret-compiler-runtime - This module contains the shared Kotlin Compiler Plugin Logic for JVM/JS/Native compiler
  • cabret-gradle - This module contains the gradle plugin which triggers the two compiler plugins
  • cabret-log - A Kotlin Multiplatform project with the DebugLog annotation and the default loggers
  • DemoProject - A Kotlin Multiplatform project that is using the debuglog compiler plugin

✍️ Feedback

Feel free to send feedback on Twitter or file an issue. Feature requests are always welcome.

📜 License


This project is licensed under Apache License, Version 2.0

Copyright 2020 Jens Klingenberg

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.
Comments
  • Stack overflow on non-annotated method

    Stack overflow on non-annotated method

    This one is super weird. After adding cabret as a dependency (plugin, library - all of it) one of my methods is consistently failing due to stackoverflow. Callstack:

    java.lang.StackOverflowError
    	at com.redacted.infrastructure.cache.Cache$map$1.get(Cache.kt)
    	at com.redacted.infrastructure.cache.Cache$map$1.get(Cache.kt)
    	at com.redacted.infrastructure.cache.Cache$map$1.get(Cache.kt)
          ....
    

    It seems like cabret created recurrent call for some reason? Or maybe some other sub-dependency might be to blame? Method looks like this:

    private val map = object : LinkedHashMap<TKey, Entry<TValue>>(cacheSize, 0.75f, true) {
            override fun removeEldestEntry(eldest: MutableMap.MutableEntry<TKey, Entry<TValue>>?): Boolean {
                return this.size > cacheSize
            }
        }
    
    private data class Entry<TValue>(val element: TValue, val createdAt: LocalDateTime)
    
    operator fun get(key: TKey): TValue? {
            val cachedValue = map[key]
            if (cachedValue == null || lifeLimit == null) return cachedValue?.element
    
            // validate lifelimit
            val limit = cachedValue.createdAt.plus(lifeLimit)
            return if (limit >= now()) {
                cachedValue.element
            } else {
                null
            }
        }
    

    The method is not annotated, so it shouldn't be modified in any way

    opened by jakoss 4
  • Bump gradle from 4.0.2 to 7.3.0

    Bump gradle from 4.0.2 to 7.3.0

    Bumps gradle from 4.0.2 to 7.3.0.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies java 
    opened by dependabot[bot] 1
  • Bump gradle from 4.0.2 to 7.2.2

    Bump gradle from 4.0.2 to 7.2.2

    Bumps gradle from 4.0.2 to 7.2.2.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies java 
    opened by dependabot[bot] 1
  • NoSuchMethodError: 'org.jetbrains.kotlin.ir.declarations.IrVariable

    NoSuchMethodError: 'org.jetbrains.kotlin.ir.declarations.IrVariable

    I keep getting this error:

    e: java.lang.NoSuchMethodError: 'org.jetbrains.kotlin.ir.declarations.IrVariable org.jetbrains.kotlin.ir.builders.ExpressionHelpersKt.irTemporary$default(org.jetbr ains.kotlin.ir.builders.IrStatementsBuilder, org.jetbrains.kotlin.ir.expressions.IrExpression, java.lang.String, org.jetbrains.kotlin.types.KotlinType, org.jetbrai ns.kotlin.ir.types.IrType, int, java.lang.Object)' at de.jensklingenberg.cabret.compiler.CabretLogTransformer$transformFunction$1.invoke(CabretLogTransformer.kt:110) at de.jensklingenberg.cabret.compiler.CabretLogTransformer$transformFunction$1.invoke(CabretLogTransformer.kt:49) at org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.<init>(IrBlockBodyImpl.kt:33) at org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl.createBlockBody(IrFactoryImpl.kt:282) at de.jensklingenberg.cabret.compiler.CabretLogTransformer.transformFunction(CabretLogTransformer.kt:107) at de.jensklingenberg.cabret.compiler.CabretLogTransformer.visitSimpleFunction(CabretLogTransformer.kt:82) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:73) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:24) at org.jetbrains.kotlin.ir.declarations.IrSimpleFunction.accept(IrSimpleFunction.kt:28) at org.jetbrains.kotlin.ir.IrElement$DefaultImpls.transform(IrElement.kt:32) at org.jetbrains.kotlin.ir.IrElementBase.transform(IrElementBase.kt:19) at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35) at org.jetbrains.kotlin.ir.declarations.IrClass.transformChildren(IrClass.kt:66) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:57) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClass(IrElementTransformerVoid.kt:66) at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitClassNew(IrElementTransformerVoidWithContext.kt:111) at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitClass(IrElementTransformerVoidWithContext.kt:47) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClass(IrElementTransformerVoid.kt:67) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClass(IrElementTransformerVoid.kt:24) at org.jetbrains.kotlin.ir.declarations.IrClass.accept(IrClass.kt:55) at org.jetbrains.kotlin.ir.IrElement$DefaultImpls.transform(IrElement.kt:32) at org.jetbrains.kotlin.ir.IrElementBase.transform(IrElementBase.kt:19) at org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl.transformChildren(IrFileImpl.kt:71) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:330) at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:325) at de.jensklingenberg.cabret.compiler.CabretLogTransformer.lower(CabretLogTransformer.kt:76) at de.jensklingenberg.cabret.compiler.UtilKt$runOnFileInOrder$1.visitFile(Util.kt:30) at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitFile(IrElementVisitorVoid.kt:38) at de.jensklingenberg.cabret.compiler.UtilKt$runOnFileInOrder$1.visitFile(Util.kt:24) at de.jensklingenberg.cabret.compiler.UtilKt$runOnFileInOrder$1.visitFile(Util.kt:24) at org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl.accept(IrFileImpl.kt:63) at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoidKt.acceptVoid(IrElementVisitorVoid.kt:271) at de.jensklingenberg.cabret.compiler.UtilKt.runOnFileInOrder(Util.kt:24) at de.jensklingenberg.cabret.compiler.CabretIrGenerationExtension.generate(CabretIrGenerationExtension.kt:12) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory$generateModule$1.invoke(JvmIrCodegenFactory.kt:93) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory$generateModule$1.invoke(JvmIrCodegenFactory.kt:89) at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:91) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:106) at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:35) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:595) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:211) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:154) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:386) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:110) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:286) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:99) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:114) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:74) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:607) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:96) at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1659) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) at java.base/java.security.AccessController.doPrivileged(AccessController.java:691) at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705) at java.base/java.security.AccessController.doPrivileged(AccessController.java:391) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832)

    opened by jeffnyauke 1
  • Bump gradle from 4.0.2 to 7.3.1

    Bump gradle from 4.0.2 to 7.3.1

    Bumps gradle from 4.0.2 to 7.3.1.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies java 
    opened by dependabot[bot] 0
  • Bump gradle-maven-publish-plugin from 0.15.1 to 0.22.0

    Bump gradle-maven-publish-plugin from 0.15.1 to 0.22.0

    Bumps gradle-maven-publish-plugin from 0.15.1 to 0.22.0.

    Release notes

    Sourced from gradle-maven-publish-plugin's releases.

    0.21.0

    Changelog

    0.20.0

    Changelog

    0.19.0

    Changelog

    0.18.0

    Changelog

    0.17.0

    Changelog

    0.16.0

    Changelog

    Changelog

    Sourced from gradle-maven-publish-plugin's changelog.

    Version 0.22.0 (2022-09-09)

    • NEW: When publishing to maven central by setting SONATYPE_HOST or calling publishToMavenCentral(...) the plugin will now explicitly create a staging repository on Sonatype. This avoids issues where a single build would create multiple repositories
    • The above change means that the plugin supports parallel builds and it is not neccessary anymore to use --no-parallel and --no-daemon together with publish
    • NEW: When publishing with the publish or publishAllPublicationsToMavenCentralRepository tasks the plugin will automatically close the staging repository at the end of the build if it was successful.
    • NEW: Option to also automatically release the staging repository after closing was susccessful
    SONATYPE_HOST=default # or S01
    SONATYPE_AUTOMATIC_RELEASE=true
    

    or

    mavenPublishing {
      publishToMavenCentral("DEFAULT", true)
      // or publishToMavenCentral("S01", true)
    }
    
    • in case the option above is enabled, the closeAndReleaseRepository task is not needed anymore
    • when closing the repository fails the plugin will fail the build immediately instead of timing out
    • when closing the repository fails the plugin will try to print the error messages from Nexus
    • increased timeouts for calls to the Sonatype Nexus APIs
    • fixed incompatibility with the com.gradle.plugin-publish plugin
    • added wokaround for Kotlin multiplatform builds reporting disabled build optimizations

    Version 0.21.0 (2022-07-11)

    Minimum supported Gradle version is now 7.2.0

    Minimum supported Android Gradle Plugin versions are now 7.1.2, 7.2.0-beta02 and 7.3.0-alpha01

    Behavior changes

    The com.vanniktech.maven.publish stops adding Maven Central (Sonatype OSS) as a publishing target and will not enable GPG signing by default. To continue publishing to maven central and signing artifacts either add the following to your gradle.properties:

    SONATYPE_HOST=DEFAULT
    # SONATYPE_HOST=S01 for publishing through s01.oss.sonatype.org
    RELEASE_SIGNING_ENABLED=true
    

    or add this to your Groovy build files:

    mavenPublishing {
      publishToMavenCentral()
      // publishToMavenCentral("S01") for publishing through s01.oss.sonatype.org
      signAllPublications()
    }
    

    ... (truncated)

    Commits
    • 7df14f3 Prepare for release 0.22.0
    • 3dd754a Use version catalog to manage dependencies to make renovate work again (#412)
    • 0dc4587 prepare changelog for next release (#411)
    • 0db5be2 drop repository when build fails (#410)
    • 19a8631 retrieve activity messages when closing repository fails (#409)
    • d28e119 Use composite builds instead of buildSrc (#408)
    • 5e48420 Create nexus lazily to avoid an error when properties aren't set (#405)
    • 86b2c8f workaround issues with the signing setup (#404)
    • c143338 automatically close the created repository and optionally also release it (#403)
    • 482502d detect when closing the repository failed (#402)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies java 
    opened by dependabot[bot] 0
  • No return log for android app

    No return log for android app

    I'm trying to use this library on only-android (no multiplatform setup) app. I used plugin and de.jensklingenberg.cabret:cabret-log, both with 1.0.3 versions. I enabled cabret and useIR in kotlinOptions block like that: image

    Whenever i use @DebugLog annotation i only have the function entry log. The return log never arrives (i checked in custom logger with breakpoint - only entry logs arrive there)

    opened by jakoss 2
  • Request: add option to log for all functions, if taken too long, especially for UI thread

    Request: add option to log for all functions, if taken too long, especially for UI thread

    When the UI takes too long on some function, it could be nice to know what's the cause of it. It can also be useful for functions that we might be able to optimize.

    Please offer some flags to handle these. Maybe add some configuration for these. For example, we could mark it to log non-UI functions if they take more than 1sec, and for UI functions if they take more than 30ms (I'm generous because of the toll of the library).

    opened by AndroidDeveloperLB 0
Releases(v1.0.4)
  • v1.0.4(Jun 6, 2021)

    1.0.4

    • renamed Cabret.Listener to Cabret.Logger
    • replaced "override fun log(tag: String, msg: String, logLevel: Cabret.LogLevel)" with override fun log(data: LogData)
    • add targets for macos, ios, watchos
    • android minSDK is now 16
    Source code(tar.gz)
    Source code(zip)
Owner
Jens Klingenberg
Android Developer, FLOSS Contributor, experimenting with Kotlin Multiplatform, Jetpack Compose
Jens Klingenberg
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
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
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
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
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
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
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
📄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
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
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
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
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.

ShiftHackZ 2 Jul 13, 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
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
Yakl - Yet Another Kotlin Logger

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

Mark Kosichkin 4 Jan 19, 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
This project consists in the approach of a bakery business, in which the user can book one or more products (cakes), in addition to having the method of payment in cash (post-shipment) or the method of payment via mobile

This project consists in the approach of a bakery business, in which the user can book one or more products (cakes), in addition to having the method of payment in cash (post-shipment) or the method of payment via mobile

Paul Guillen Acuña 2 Dec 20, 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
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.

Arkadii Ivanov 460 Dec 31, 2022
Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Chris Russell 1 Feb 11, 2022