Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TinyLog doesn't honor default log level #698

Closed
sahil-ramagiri opened this issue Mar 10, 2024 · 1 comment
Closed

TinyLog doesn't honor default log level #698

sahil-ramagiri opened this issue Mar 10, 2024 · 1 comment
Labels

Comments

@sahil-ramagiri
Copy link

sahil-ramagiri commented Mar 10, 2024

Describe the bug
I swear it was working before, but then the default logging level seems to be TRACE. It's not my environment, I tried to use online java compilers and I see its the same.

To Reproduce
Steps to reproduce the behavior:

  1. https://onecompiler.com/java/426vjvt5q
  2. No Environment variables or Vm arguments are used

Code:

import java.util.*;

import org.tinylog.Logger;

public class Main {
    public static void main(String[] args) {

      System.out.println("TraceEnabled= "+Logger.isTraceEnabled());
      Logger.trace("log on trace");

      System.out.println("DebugEnabled= "+Logger.isDebugEnabled());
      Logger.debug("log on debug");

  }
}

Expected:

TraceEnabled= false
DebugEnabled= false

Actual

TraceEnabled= true
2024-03-10 17:55:20 [main] Main.main()
TRACE: log on trace
DebugEnabled= true
2024-03-10 17:55:20 [main] Main.main()
DEBUG: log on debug

Environment
tinylog version: 2.7.0
Java version:

Example Screenshots:

image

@pmwmedia
Copy link
Member

In tinylog 2, all severity levels are enabled by default, including trace and debug. Therefore, the actual output is correct. If you want to disable both severity levels, you can set another default severity level: https://tinylog.org/v2/configuration/#severity-level

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants