Package org.openapitools.codegen.utils
Class OnceLogger
- java.lang.Object
-
- org.slf4j.ext.LoggerWrapper
-
- org.openapitools.codegen.utils.OnceLogger
-
- All Implemented Interfaces:
org.slf4j.Logger
public class OnceLogger extends org.slf4j.ext.LoggerWrapperProvides calling code a way to log important messages only once, regardless of how many times the invocation has occurred. This can be used, for instance, to log a warning like "One or more schemas aren't declared" without logging that message for every time the schema is mentioned in a document. This implementation currently only supports single-argument string literal log methods (e.g.Logger.debug(String)).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(String msg)Delegate to the appropriate method of the underlying logger.voiderror(String msg)Delegate to the appropriate method of the underlying logger.voidinfo(String msg)Delegate to the appropriate method of the underlying logger.static org.slf4j.Loggeronce(org.slf4j.Logger logger)voidtrace(String msg)Delegate to the appropriate method of the underlying logger.voidwarn(String msg)Delegate to the appropriate method of the underlying logger.-
Methods inherited from class org.slf4j.ext.LoggerWrapper
debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, getName, info, info, info, info, info, info, info, info, info, isDebugEnabled, isDebugEnabled, isErrorEnabled, isErrorEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn
-
-
-
-
Method Detail
-
once
public static org.slf4j.Logger once(org.slf4j.Logger logger)
-
trace
public void trace(String msg)
Delegate to the appropriate method of the underlying logger.- Specified by:
tracein interfaceorg.slf4j.Logger- Overrides:
tracein classorg.slf4j.ext.LoggerWrapper- Parameters:
msg- The log message.
-
debug
public void debug(String msg)
Delegate to the appropriate method of the underlying logger.- Specified by:
debugin interfaceorg.slf4j.Logger- Overrides:
debugin classorg.slf4j.ext.LoggerWrapper- Parameters:
msg- The log message.
-
info
public void info(String msg)
Delegate to the appropriate method of the underlying logger.- Specified by:
infoin interfaceorg.slf4j.Logger- Overrides:
infoin classorg.slf4j.ext.LoggerWrapper- Parameters:
msg- The log message.
-
warn
public void warn(String msg)
Delegate to the appropriate method of the underlying logger.- Specified by:
warnin interfaceorg.slf4j.Logger- Overrides:
warnin classorg.slf4j.ext.LoggerWrapper- Parameters:
msg- The log message.
-
error
public void error(String msg)
Delegate to the appropriate method of the underlying logger. Use this method sparingly. If you're limiting error messages, ask yourself whether your log fits better as a warning.- Specified by:
errorin interfaceorg.slf4j.Logger- Overrides:
errorin classorg.slf4j.ext.LoggerWrapper- Parameters:
msg- The log message.
-
-