Skip to content

Commit

Permalink
Add is*Enabled methods for log level checks to LogAccessor
Browse files Browse the repository at this point in the history
Closes gh-22862
  • Loading branch information
jhoeller committed May 2, 2019
1 parent 0f55366 commit cee7d09
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,51 @@ public final Log getLog() {
}


// Log level checks

/**
* Is fatal logging currently enabled?
*/
public boolean isFatalEnabled() {
return this.log.isFatalEnabled();
}

/**
* Is error logging currently enabled?
*/
public boolean isErrorEnabled() {
return this.log.isErrorEnabled();
}

/**
* Is warn logging currently enabled?
*/
public boolean isWarnEnabled() {
return this.log.isWarnEnabled();
}

/**
* Is info logging currently enabled?
*/
public boolean isInfoEnabled() {
return this.log.isInfoEnabled();
}

/**
* Is debug logging currently enabled?
*/
public boolean isDebugEnabled() {
return this.log.isDebugEnabled();
}

/**
* Is trace logging currently enabled?
*/
public boolean isTraceEnabled() {
return this.log.isTraceEnabled();
}


// Plain log methods

/**
Expand Down

0 comments on commit cee7d09

Please sign in to comment.