Git Product home page Git Product logo

kermit's People

Contributors

aiidziis avatar avlwx2014 avatar chislett avatar chrimaeon avatar faogustavo avatar findjigar avatar jeffdgr8 avatar joreilly avatar juliajakubcova avatar jvanderwee avatar kevinschildhorn avatar kpgalligan avatar mayankmkh avatar mrf7 avatar nicolasfara avatar paulwoitaschek avatar psh avatar robxyy avatar russhwolf avatar samhill303 avatar sellmair avatar tadeaskriz avatar valery1707 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kermit's Issues

Crash reporting logger

How do we interact with crashkios and crash report tools like crashlytics. Might need modules with dependencies. might need to direct people to route interfaces to kermit

Add JVM target

Our current jvm target is specifically Android. Need to add JVM only as well

Log calls with string parameter

We currently only accept lambda's for the message parameter. This ensures we dont evaluate the string if no logger cares about it. This is good but a little clunky if you dont care about that. Consider adding a string only version

Crash id for Bugsnag

When a kotlin crash happens, we want to write the stack trace leading up to it, then let the platform crash on it's own. That results in 2 reports. One handled and one not. This is know behavior. However, it would be good to be able to trace between the two reports. We're adding custom data values that have an id that can match. Currently, however, searching doesn't find the key data. We should explore what fields are searchable by bugsnag (if any), and put the id in a field that is searchable.

If #249 works out, this bug is irrelevant.

Build library for js with IR

When using this library with a js(IR) target I have this error:

Could not determine the dependencies of task ':shared:jsPackageJson'.
> Could not resolve all dependencies for configuration ':shared:jsNpm'.
   > Could not resolve co.touchlab:kermit:0.1.8.
     Required by:
         project :shared
      > No matching variant of co.touchlab:kermit:0.1.8 was found. The consumer was configured to find a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js', attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir'

I suppose you just need to add js(IR) to your targets, but I never developed a multiplatform library so I'm not sure :)

stack trace on native is shallow

On native, default stack trace only prints a few lines, which is pretty useless. Need to look if that's being capped by Kermit or something else

Bugsnag logging implementation for other platforms

Make the BugsnagLogger an expect class with different platform implementations. Could make separate classes per platform, but there's not a lot that I think we need to have platform specific in the interface, so we can make Kermit init simpler with an expect class.

Bugsnag has a lot of platforms available. We should see which we really want to cover. Android/jvm for sure, but JS and maybe server.

JS Artifacts files

It looks like the ide is creating artifact xml files in the .idea folder. Should these be ignored in git?

Document sample usage

Perhaps in it's own readme we should have some instructions on how to use the sample. This should include usage of publishToMavenLocal to get updates of the library and any platform specific info such as how to use JS

Method println in android.util.Log not mocked.

Hello ๐Ÿ‘‹

I am having exception during my test. This issue happen on androidTest in common module.

    java.lang.RuntimeException: Method println in android.util.Log not mocked. See http://g.co/androidstudio/not-mocked for details.
        at android.util.Log.println(Log.java)
        at co.touchlab.kermit.LogcatLogger.log(LogcatLogger.kt:27)
        at com.github.mustafaozhan.logmob.LogMobLogger.log(LogMobLogger.kt:26)
        at co.touchlab.kermit.Logger.d(Logger.kt:22)
        at co.touchlab.kermit.Kermit.d(Kermit.kt:43)
        at co.touchlab.kermit.Kermit.d$default(Kermit.kt:42)
        at co.touchlab.kermit.Kermit.d(Kermit.kt:47)
        at com.github.mustafaozhan.ccc.common.BaseRepositoryTest.init(BaseRepositoryTest.kt:18)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
        at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
        at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
        at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
        at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
        at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110)
        at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
        at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
        at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
        at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
        at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:119)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:834)

1 test completed, 1 failed

It happens on

    @BeforeTest
    fun init() {
        application = initKoin()
        platformRepository = application.koin.get(PlatformRepository::class)
    }

and it has a simple logging inside.

fun initKoin(vararg modules: Module?) = startKoin {
    kermit.d { "initialising koin" }
    modules.forEach { it?.let { modules(it) } }
    modules(commonModule)
}

I know i can just remove the logging :) but just wanted to report since we may have logging in many places :)

It only happens if I use LogcatLogger for android, doesn't occur if i use CommonLogger.

I prefer to use LogcatLogger since it has different colors in logcat but because of this exception I am kind a forced to use CommonLogger.

Enable static and dynamic config options

Static Kermit config is better for performance, but there may be use cases for dynamic config. I think this can be enabled with some config magic. To explore.

Remove test cocoapods configuration

The Kermit library currently has the cocoapods plugin installed and a podspec in the library root. This isn't needed as the library is included directly in KMP libraries. Just have to remove the plugin application, configuration, classpath in settings.gradle, and podspec

Crash id for Crashlytics

When a kotlin crash happens, we want to write the stack trace leading up to it, then let the platform crash on it's own. That results in 2 reports. One handled and one not. This is know behavior. However, it would be good to be able to trace between the two reports. We're adding custom data values that have an id that can match. Currently, however, searching doesn't find the key data. We should explore what fields are searchable by crashlytics (if any), and put the id in a field that is searchable.

Crashlytics logging implementation for other platforms

Make the CrashlyticsLogger an expect class with different platform implementations. Could make separate classes per platform, but there's not a lot that I think we need to have platform specific in the interface, so we can make Kermit init simpler with an expect class.

Publish artifacts

Need to decide on where the eventual public artifact will be published. Start publishing private versions if that's possible. Update readme to show including the dependency

Message function parameter performance

We currently pass the message via a function parameter that only get's invoked if a logger returns true for isLoggable. The idea was to prevent unnecessary string allocation if a log isn't going to be outputted, but I worry that it may have more negative performance implications than positive at the moment.

First, we call the block multiple times, once for each loggable logger. We should optimize to only invoke it once if there is a loggable logger and reuse it for any others. There is also a performance impact for invoking functions which may outweigh string allocation.

Add normal logging methods beside the closure ones

If I cast an object from a generic property to a more specific one, then this smart cast is not available in the d{ } closure

Screenshot 2021-07-26 at 09 59 13

If I define a normal method:

fun Kermit.d(message:String) {
    this.d { message }
}

Then the smart cast is available

OSLogLogger throwable severity

Currently we log the throwable string as a fault. Should we instead match the severity that it got passed in at? Maybe the caller wanted to print a relatively benign throwable at a lower severity

Log throwables

We currently dont handle throwables in any of our prebuilt loggers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.