Giter VIP home page Giter VIP logo

Comments (5)

igorakkerman avatar igorakkerman commented on June 14, 2024

Hi @tkaiser and thanks a lot for reporting this issue. I believe it is related to AWS Lambda now allowing to use Java 11, while this library was created and tested on Java 8, when that was the only viable option with AWS Lambda. Thank you as well for providing your workaround. I will try to incorporate it into the library in order to provide the ease of use it was designed for in the first place.

from jlib-awslambda-logback.

igorakkerman avatar igorakkerman commented on June 14, 2024

Hi @tkaiser and @dmitry-weirdo,
I finally got to investigate the issue. I created a project using a Gradle Kotlin DSL build depending on this library, as you described. I tried targeting Java 8, then Java 11. I deployed both versions as lambda functions and both worked fine out of the box.

Here are the relevant parts of my build.gradle.kts:

plugins {
    id("java-library")
    id("com.github.johnrengelman.shadow") version "2.0.4"
}
// ...
java {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}
// ...
implementation("org.slf4j:slf4j-api:1.8.0-beta2")
runtimeOnly("org.jlib:jlib-awslambda-logback:1.0.0")
...
tasks {
    assemble {
        dependsOn(shadowJar)
    }
}
...

Could you please share the exact configuration that leads to issues in your case? I'll be more than happy to dig into it.

Update:
I now tested with the configuration you provided and, again, had no issues:

# ./gradlew --version

------------------------------------------------------------
Gradle 5.6.4
------------------------------------------------------------

Build time:   2019-11-01 20:42:00 UTC
Revision:     dd870424f9bd8e195d614dc14bb140f43c22da98

Kotlin:       1.3.41
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM:          11.0.6 (Oracle Corporation 11.0.6+10)
OS:           Linux 4.19.76-linuxkit amd64

# java --version
openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment 18.9 (build 11.0.6+10)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10, mixed mode)

from jlib-awslambda-logback.

igorakkerman avatar igorakkerman commented on June 14, 2024

Closed the issue for now, please feel free to reopen if you're still experiencing problems. Thanks.

from jlib-awslambda-logback.

glambert22 avatar glambert22 commented on June 14, 2024

I'm seeing this issue in both j8 and j11. I have a lambda to which I need to move to logback for json logging. But before I do that I wanted to get logback in place of the default log4j logging . I first got the SLF4J: No SLF4J providers were found. with the default configuration. Also none of the configuration above worked for me. I then I tried:

    implementation 'org.slf4j:slf4j-api:1.8.0-beta4'
    implementation ('ch.qos.logback:logback-classic:1.3.0-alpha4') {
        exclude group: 'ch.qos.logback', module: 'logback-core'
    }
    compile 'ch.qos.logback:logback-core:1.3.0-alpha4'
    implementation 'org.jlib:jlib-awslambda-logback:1.0.0'

Which got me pass the no SLF4J provider issue. But now the AWSRequestId is not present in my logout. Also the class that is logging s a service class of the actually lambda handler

from jlib-awslambda-logback.

ehrlichja avatar ehrlichja commented on June 14, 2024

I'm seeing this problem currently with the Java 11 runtime. I'm using sbt with the following deps:

  "org.slf4j" % "slf4j-api" % "1.7.36",
  "org.jlib" % "jlib-awslambda-logback" % "1.0.0",

from jlib-awslambda-logback.

Related Issues (9)

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.