INFINITE-TECHNOLOGY / BOBBIN

Licence: Apache-2.0 license
Revolutionary high-performance Groovy/Java Slf4j logger

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to BOBBIN

slf4j-timber
SLF4J binding for Timber - a logger with a small, extensible API which provides utility on top of Android's normal Log class.
Stars: ✭ 20 (+17.65%)
Mutual labels:  slf4j, slf4j-binding
blindsight
Blindsight is a Scala logging API with DSL based structured logging, fluent logging, semantic logging, flow logging, and context aware logging.
Stars: ✭ 70 (+311.76%)
Mutual labels:  slf4j, slf4j-api
trembita
Model complex data transformation pipelines easily
Stars: ✭ 44 (+158.82%)
Mutual labels:  slf4j
Sofa Common Tools
sofa-common-tools is a library that provide some utility functions to other SOFA libraries.
Stars: ✭ 141 (+729.41%)
Mutual labels:  slf4j
Slf4j Timbre
SLF4J binding for Clojure's Timbre
Stars: ✭ 64 (+276.47%)
Mutual labels:  slf4j
Tinylog
tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android
Stars: ✭ 360 (+2017.65%)
Mutual labels:  slf4j
Timbre
Pure Clojure/Script logging library
Stars: ✭ 1,253 (+7270.59%)
Mutual labels:  slf4j
errorprone-slf4j
An Error Prone plugin for SLF4J
Stars: ✭ 26 (+52.94%)
Mutual labels:  slf4j
Stubbornjava
Unconventional Java code for building web servers / services without a framework. Think dropwizard but as a seed project instead of a framework. If this project had a theme it would be break the rules but be mindful of your decisions.
Stars: ✭ 184 (+982.35%)
Mutual labels:  slf4j
Slogging
A Typesafe-logging (and slf4j) compatible logging library based on macros for Scala/JVM, Scala.js, and Scala Native
Stars: ✭ 44 (+158.82%)
Mutual labels:  slf4j
Skill6 Website Backend
java进阶开发,高级版web项目。基于dubbo实现分布式微服务架构,基于spring boot、spring mvc、mybatis、docker、ELK、redis、vue.js、node.js等技术实现的技术分享交流网站。网站名称:技术流,英文名:skill6。主要功能有:登录注册、单点登录、restful设计、文章及评论、代码及资源下载、主题讨论等。持续更新中...
Stars: ✭ 140 (+723.53%)
Mutual labels:  slf4j
Testlogcollectors
A framework for capturing log statements during tests. Compatible with most popular logging frameworks. Works with JUnit and TestNG
Stars: ✭ 31 (+82.35%)
Mutual labels:  slf4j
Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (+2388.24%)
Mutual labels:  slf4j
Zio Logging
Simple logging for ZIO apps, with correlation, context & pluggable backends out of the box.
Stars: ✭ 85 (+400%)
Mutual labels:  slf4j
Scribe
The fastest logging library in the world. Built from scratch in Scala and programmatically configurable.
Stars: ✭ 304 (+1688.24%)
Mutual labels:  slf4j
Terse Logback
Structured Logging, Tracing, and Observability with Logback
Stars: ✭ 146 (+758.82%)
Mutual labels:  slf4j
Kotlin Inline Logger
A logger facilitating lazily-evaluated log calls via Kotlin's inline classes & functions.
Stars: ✭ 77 (+352.94%)
Mutual labels:  slf4j
Feign
Feign makes writing java http clients easier
Stars: ✭ 7,681 (+45082.35%)
Mutual labels:  slf4j
Finatra
Fast, testable, Scala services built on TwitterServer and Finagle
Stars: ✭ 2,126 (+12405.88%)
Mutual labels:  slf4j
Kotlin Logging
Lightweight logging framework for Kotlin. A convenient and performant logging library wrapping slf4j with Kotlin extensions
Stars: ✭ 1,378 (+8005.88%)
Mutual labels:  slf4j

Introduction

Bobbin is a high-performance Slf4j-compatible logger designed for multi-threaded applications (especially those with persistent threads like batch, stream and messaging applications).

Bobbin leverages the concept of Logback/Log4j2 sifting appenders while providing much more easier configuration using native Groovy/Java scripting expressions.

Bobbin is available in JCenter repository.

Maven

Note that there is no <type>pom</type>

Example Maven project with Bobbin

...
<repositories>
    <repository>
        <id>jcenter</id>
        <name>jcenter</name>
        <url>https://jcenter.bintray.com</url>
    </repository>
</repositories>
...
<dependency>
    <groupId>io.i-t</groupId>
    <artifactId>bobbin</artifactId>
    <version>4.1.0</version>
</dependency>
...

Gradle

repositories {
    jcenter()
}
dependencies {
    compile "org.codehaus.groovy:groovy-all:2.5.4"
    compile "io.i-t:bobbin:4.1.0"
}

Sample configurations

Examples of Bobbin.yml for different use cases.

General usage

destinations:
  - name: io.infinite.bobbin.config.ConsoleDestinationConfig
    levels: [warn, error, info]
  - name: io.infinite.bobbin.config.FileDestinationConfig
    packages: [io.infinite]
    fileName: ("./LOGS/INFINITE/${className}/${level}/${className}_${level}_${date}.log")
  - name: io.infinite.bobbin.config.FileDestinationConfig
    fileName: ("./LOGS/PACKAGES/${className}/${level}/${className}_${level}_${date}.log")
    format: dateTime + delimiter + level + delimiter + threadName + delimiter + className + delimiter + message

Spring Boot

Logging Spring Boot HTTP with Bobbin

destinations:
  - name: io.infinite.bobbin.config.ConsoleDestinationConfig
    formatThrowable: "%format% + delimiter + throwable"
    levels: [warn, error, info]
  - name: io.infinite.bobbin.config.FileDestinationConfig
    levels: [warn]
    fileName: ("./LOGS/WARNINGS_${date}.log")
  - name: io.infinite.bobbin.config.FileDestinationConfig
    levels: [error]
    fileName: ("./LOGS/ERRORS_${date}.log")
  - name: io.infinite.bobbin.config.FileDestinationConfig
    packages: [org.springframework.web]
    fileName: ("./LOGS/SPRING_WEB/SPRING_WEB_${date}.log")

Logstash

Pass named parameters to Logstash without using MDC (using positioned logging arguments indexes instead).

levels: [info, warn, error, debug]
destinations:
  - name: io.infinite.bobbin.config.ConsoleDestinationConfig
    packages: [com.acme.logstash]
    dateTimeFormat: "yyyy-MM-dd'T'HH:mm:ss:SSSZ"
    lineBreak: ",\r\n"
    formatArgs: |-
      """{
        "@timestamp": "$dateTime",
        "@version": "1",
        "message": "$message",
        "logger_name": "$className",
        "thread_name": "$threadName",
        "level": "$level",
        "username": "${args[0]}",
        "URI": "${args[1]}",
        "sessionId": "${args[2]}",
        "transactionId": "${args[3]}",
        "instanceId": "${MDC.get('instanceUUID')}"
      }"""

MDC and log formatting

Use MDC and change formatting of individual logging signatures - like formatThrowable in this case.

%format% placeholder helps to reuse the base formatting (which itself can be also redefined using format parameter).

format: dateTime + delimiter + MDC.get("instanceUUID") + delimiter + level + delimiter + threadName + delimiter + className + delimiter + message
destinations:
  - name: io.infinite.bobbin.config.ConsoleDestinationConfig
    formatThrowable: "%format% + delimiter + throwable"
    levels: [warn, error, info]
  - name: io.infinite.bobbin.config.FileDestinationConfig
    levels: [warn]
    fileName: ("./LOGS/WARNINGS_${date}.log")
  - name: io.infinite.bobbin.config.FileDestinationConfig
    levels: [error]
    fileName: ("./LOGS/ERRORS_${date}.log")
  - name: io.infinite.bobbin.config.FileDestinationConfig
    packages: [org.springframework.web]
    fileName: ("./LOGS/SPRING_WEB/SPRING_WEB_${date}.log")
  - name: io.infinite.bobbin.config.FileDestinationConfig
    packages: [io.infinite]
    fileName: ("./LOGS/THREADS/${threadGroupName}/${threadName}/${threadName}_${date}.log")
  - name: io.infinite.bobbin.config.FileDestinationConfig
    packages: [conf.plugins.output]
    fileName: ("./LOGS/PLUGINS/OUTPUT/${className}/${className}_${date}.log")
  - name: io.infinite.bobbin.config.FileDestinationConfig
    packages: [conf.plugins.input]
    fileName: ("./LOGS/PLUGINS/INPUT/${className}/${className}_${date}.log")
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].