Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Paul S.
    @pshirshov
    You need to leave only one of the backends

    also "com.github.pshirshov.izumi.r2" %% "logstage-sink-file" % izumi_version doesn't seem to exist anymore

    Yup, it was integrated into the core. We will update docs soon

    so I'm using logstage and love it

    Glad to hear :)

    @hderms
    Kai
    @kaishh
    If you have anything with log4j you need a converter to slf4j too.
    Dermot Haughey
    @hderms
    @pshirshov i'm not sure about that because iadded slf4j-nop as a test and it warned me that it conflicted with logstage slf4j adapter which was already bound
    i now believe that slf4j stuff is going through logstage but the issue i'm still seeing is that i can't get slf4j adapter to jsonify the logs
    @pshirshov do you know how I could get it to use a json sink
    Maksym
    @ratoshniuk
    @hderms "com.github.pshirshov.izumi.r2" %% "logstage-rendering-circe" % izumi_version
    for rendering into json please use follow import
    Dermot Haughey
    @hderms
    the rest of my logs are jsonified
    i am already using that import
    Maksym
    @ratoshniuk
    ah, see, you can’t jsonify slf4j logs
    Kai
    @kaishh
    You can still make it JSON sink afaik
    Dermot Haughey
    @hderms
    my goal is to wrap the slf4j log in a json object i don't really care if it's not perfectly converted to json in a structured manner
    Paul S.
    @pshirshov
    Probably @kaishh is right.
    slf4j bridge requires initialization
    Do you have such a call somewhere in your code?
    Dermot Haughey
    @hderms
    i do not
    Kai
    @kaishh
    Paul S.
    @pshirshov
    Okay, that's the answer
    You may use our test as an example
    Dermot Haughey
    @hderms
    router is protected
    there we go thanks
    i believe the test provides the answer
    Paul S.
    @pshirshov

    router is protected

    But you instantiate router somewhere anyway, right? Just pass it to the bridge

    Dermot Haughey
    @hderms
    i did not instantiate router anywhere
    Kai
    @kaishh
    IzLogger.apply() creates router on its own, so it doesn’t have to be manually created
    Dermot Haughey
    @hderms
    wonderful
    well I officially love logstage
    Paul S.
    @pshirshov
    You are welcome
    Kai
    @kaishh
    I guess .router should be unprotected, since this makes smart constructors less desirable :\
    Cheers!
    Paul S.
    @pshirshov
    @hderms : there is still some work which needs to be done - we need to improve layout definition language and reimplement configuration logic. So in case you are unhappy with some things - we will fix em eventually.
    Dermot Haughey
    @hderms
    yeah i like the overall design though
    we are dependency injecting the logger down the call tree adding context with logger('foo' -> 'bar')
    Dermot Haughey
    @hderms
    the design is really good for structured logging
    tried to use scribe and others and they just aren't designed to do structured logging
    MDC's are a terrible pattern imo
    Paul S.
    @pshirshov
    Exactly
    In case you like logstage you may look at our other things
    :)
    Actually, we have a DI framework
    And an RPC framework too. But it's in an early beta
    Dermot Haughey
    @hderms
    distage seemed cool but we don't have enough dependencies to need/want a framework at the moment
    might reconsider eventually
    Dermot Haughey
    @hderms
    I think one thing I could actually reccomend for logstage is just an easy way to log a case class that has a circe encoder like