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

Logging a string is disabled at warn and error levels in LocationIgnorantKLogger #276

Closed
dondod opened this issue Feb 14, 2023 · 5 comments

Comments

@dondod
Copy link

dondod commented Feb 14, 2023

https://github.com/oshai/kotlin-logging/blob/master/src/jvmMain/kotlin/io/github/oshai/slf4j/internal/LocationIgnorantKLogger.kt#L240

This doesn't seem right (checking for trace instead of warn):

  override fun warn(msg: String?) {
    if (isTraceEnabled) {
      underlyingLogger.warn(msg)
    }
  }

same for error:

 override fun error(msg: String?) {
    if (isTraceEnabled) {
      underlyingLogger.error(msg)
    }
  }
@github-actions
Copy link

Thank you for reporting an issue. See the wiki for documentation and slack for questions.

oshai added a commit that referenced this issue Feb 14, 2023
@oshai
Copy link
Owner

oshai commented Feb 14, 2023

Thanks for reporting!

oshai added a commit that referenced this issue Feb 14, 2023
oshai added a commit that referenced this issue Feb 14, 2023
@oshai
Copy link
Owner

oshai commented Feb 14, 2023

Fixed in 4.0.0-beta-18 (I missed one spot so created to releases for it)

@dondod
Copy link
Author

dondod commented Feb 14, 2023

Thanks! Looks like the same issue exists with debug and info though:

 override fun debug(msg: String?) {
    if (isTraceEnabled) {
      underlyingLogger.debug(msg)
    }
  }
override fun info(msg: String?) {
    if (isTraceEnabled) {
      underlyingLogger.info(msg)
    }
  }

oshai added a commit that referenced this issue Feb 15, 2023
@oshai
Copy link
Owner

oshai commented Feb 15, 2023

Thanks! fixed in 4.0.0-beta-19.

@oshai oshai closed this as completed Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants