F FrancescoS Member Licensed User Longtime User Mar 11, 2021 #1 Hi, I am using external libraries in B4J Non-UI program and I always get a warning on execution. Waiting for debugger to connect... SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Program started. Click to expand... My code: [CODE lang="b4x" title="SLF4J example"]#Region Project Attributes #CommandLineArgs: #MergeLibraries: false #AdditionalJar: slf4j-api-1.7.30 #AdditionalJar: sshj-0.31.0 #AdditionalJar: eddsa-0.3.0 #AdditionalJar: bcprov-jdk15on-168 #End Region Sub Process_Globals Private ssh As SSHJ End Sub Sub sshConnect Try ssh.Initialize("ssh") '... '... Catch Log("Error") End Try End Sub '... '... ' my other code ... [/CODE] Erel says the warnings can be ignored, ok, the code works fine. But I need to hide the logs on the screen otherwise every time I run the program I get these warnings. Anyone know how to disable/hide SLF4J warnings? Thanks
Hi, I am using external libraries in B4J Non-UI program and I always get a warning on execution. Waiting for debugger to connect... SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Program started. Click to expand... My code: [CODE lang="b4x" title="SLF4J example"]#Region Project Attributes #CommandLineArgs: #MergeLibraries: false #AdditionalJar: slf4j-api-1.7.30 #AdditionalJar: sshj-0.31.0 #AdditionalJar: eddsa-0.3.0 #AdditionalJar: bcprov-jdk15on-168 #End Region Sub Process_Globals Private ssh As SSHJ End Sub Sub sshConnect Try ssh.Initialize("ssh") '... '... Catch Log("Error") End Try End Sub '... '... ' my other code ... [/CODE] Erel says the warnings can be ignored, ok, the code works fine. But I need to hide the logs on the screen otherwise every time I run the program I get these warnings. Anyone know how to disable/hide SLF4J warnings? Thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 11, 2021 #2 Moved to the questions forum. Upvote 0
alwaysbusy Expert Licensed User Longtime User Mar 11, 2021 #3 I kind of remember you could do that by adding an extra #AdditionalJar: slf4j-nop-1.7.30 (this jar must match the version of your slf4j one and was included in the slf4j distribution). Upvote 0
I kind of remember you could do that by adding an extra #AdditionalJar: slf4j-nop-1.7.30 (this jar must match the version of your slf4j one and was included in the slf4j distribution).
Erel B4X founder Staff member Licensed User Longtime User Mar 11, 2021 #4 https://repo1.maven.org/maven2/org/slf4j/slf4j-nop/1.7.30/slf4j-nop-1.7.30.jar Upvote 0