All Projects → kwon37xi → slf4j-lambda

kwon37xi / slf4j-lambda

Licence: Apache-2.0 license
slf4j with Java 8 lambda

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to slf4j-lambda

Testlogcollectors
A framework for capturing log statements during tests. Compatible with most popular logging frameworks. Works with JUnit and TestNG
Stars: ✭ 31 (+34.78%)
Mutual labels:  slf4j
Sofa Common Tools
sofa-common-tools is a library that provide some utility functions to other SOFA libraries.
Stars: ✭ 141 (+513.04%)
Mutual labels:  slf4j
slf4j-timber
SLF4J binding for Jake Wharton's Timber Android logging library
Stars: ✭ 44 (+91.3%)
Mutual labels:  slf4j
Slf4j Timbre
SLF4J binding for Clojure's Timbre
Stars: ✭ 64 (+178.26%)
Mutual labels:  slf4j
Kotlin Logging
Lightweight logging framework for Kotlin. A convenient and performant logging library wrapping slf4j with Kotlin extensions
Stars: ✭ 1,378 (+5891.3%)
Mutual labels:  slf4j
Finatra
Fast, testable, Scala services built on TwitterServer and Finagle
Stars: ✭ 2,126 (+9143.48%)
Mutual labels:  slf4j
Scala Logging
Convenient and performant logging library for Scala wrapping SLF4J.
Stars: ✭ 804 (+3395.65%)
Mutual labels:  slf4j
herald
Log annotation for logging frameworks
Stars: ✭ 71 (+208.7%)
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 (+508.7%)
Mutual labels:  slf4j
BOBBIN
Revolutionary high-performance Groovy/Java Slf4j logger
Stars: ✭ 17 (-26.09%)
Mutual labels:  slf4j
Kotlin Inline Logger
A logger facilitating lazily-evaluated log calls via Kotlin's inline classes & functions.
Stars: ✭ 77 (+234.78%)
Mutual labels:  slf4j
Zio Logging
Simple logging for ZIO apps, with correlation, context & pluggable backends out of the box.
Stars: ✭ 85 (+269.57%)
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 (+700%)
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 (+91.3%)
Mutual labels:  slf4j
UniCam
A cross-platform open-source webcam viewer
Stars: ✭ 23 (+0%)
Mutual labels:  slf4j
Feign
Feign makes writing java http clients easier
Stars: ✭ 7,681 (+33295.65%)
Mutual labels:  slf4j
Terse Logback
Structured Logging, Tracing, and Observability with Logback
Stars: ✭ 146 (+534.78%)
Mutual labels:  slf4j
slf4j-fluent
A fluent api for SLF4J
Stars: ✭ 19 (-17.39%)
Mutual labels:  slf4j
slack-webhook-appender
Logback appender which posts logs to slack via incoming webhook.
Stars: ✭ 16 (-30.43%)
Mutual labels:  slf4j
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 (-13.04%)
Mutual labels:  slf4j

Slf4j-Lambda

Maven Central

Slf4j logging with Java 8 lambda expressions.

The lambda expressions are evaluated only when the log level is enabled.

Requirements

  • Java 8
  • Slf4j API

Dependencies

dependencies {
    implementation 'kr.pe.kwonnam.slf4j-lambda:slf4j-lambda-core:0.1'
}

Usages

  • Use LambdaLoggerFactory instread of Slf4j's LoggerFactory
  • Use LambdaLogger instead of Slf4j's Logger. LambdaLogger inherits Logger, so you can still use all Logger's logging methods with lambda supporting logging methods.
import kr.pe.kwonnam.slf4jlambda.LambdaLogger;
import kr.pe.kwonnam.slf4jlambda.LambdaLoggerFactory;

LambdaLogger log = LambdaLoggerFactory.getLogger(YourClass.class);

// lambda for message itself
log.debug(() -> createMessage("debug level"));

// lambda for message format's arguments
log.info("info lambda formatter number {}, string {}", () -> 123, () -> "Hello LambdaLogger");

// method reference
public String longRunnigMethod() {
    return "some long running method";
}

log.debug("Long running method logging {}", this::longRunnigMethod);

// exception logging
log.error(() -> "error lambda exception msg - " + ex.getMessage(), ex);
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].