Package com.mysql.cj.log
Class StandardLogger
java.lang.Object
com.mysql.cj.log.StandardLogger
- All Implemented Interfaces:
Log
public class StandardLogger extends java.lang.Object implements Log
Provides logging facilities for those platforms that don't have built-in facilities. Simply logs messages to STDERR.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StandardLogger(java.lang.String name)Creates a new StandardLogger object.StandardLogger(java.lang.String name, boolean logLocationInfo) -
Method Summary
Modifier and Type Method Description booleanisDebugEnabled()Is the 'debug' log level enabled?booleanisErrorEnabled()Is the 'error' log level enabled?booleanisFatalEnabled()Is the 'fatal' log level enabled?booleanisInfoEnabled()Is the 'info' log level enabled?booleanisTraceEnabled()Is the 'trace' log level enabled?booleanisWarnEnabled()Is the 'warn' log level enabled?voidlogDebug(java.lang.Object message)Logs the given message instance using the 'debug' levelvoidlogDebug(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'debug' level.voidlogError(java.lang.Object message)Logs the given message instance using the 'error' levelvoidlogError(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'error' level.voidlogFatal(java.lang.Object message)Logs the given message instance using the 'fatal' levelvoidlogFatal(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'fatal' level.voidlogInfo(java.lang.Object message)Logs the given message instance using the 'info' levelvoidlogInfo(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'info' level.protected java.lang.StringlogInternal(int level, java.lang.Object msg, java.lang.Throwable exception)voidlogTrace(java.lang.Object message)Logs the given message instance using the 'trace' levelvoidlogTrace(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'trace' level.voidlogWarn(java.lang.Object message)Logs the given message instance using the 'warn' levelvoidlogWarn(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'warn' level.
-
Constructor Details
-
StandardLogger
public StandardLogger(java.lang.String name)Creates a new StandardLogger object.- Parameters:
name- the name of the configuration to use -- ignored
-
StandardLogger
public StandardLogger(java.lang.String name, boolean logLocationInfo)- Parameters:
name- the name of the configuration to use -- ignoredlogLocationInfo- logLocationInfo
-
-
Method Details
-
isDebugEnabled
public boolean isDebugEnabled()Description copied from interface:LogIs the 'debug' log level enabled?- Specified by:
isDebugEnabledin interfaceLog- Returns:
- true if so.
-
isErrorEnabled
public boolean isErrorEnabled()Description copied from interface:LogIs the 'error' log level enabled?- Specified by:
isErrorEnabledin interfaceLog- Returns:
- true if so.
-
isFatalEnabled
public boolean isFatalEnabled()Description copied from interface:LogIs the 'fatal' log level enabled?- Specified by:
isFatalEnabledin interfaceLog- Returns:
- true if so.
-
isInfoEnabled
public boolean isInfoEnabled()Description copied from interface:LogIs the 'info' log level enabled?- Specified by:
isInfoEnabledin interfaceLog- Returns:
- true if so.
-
isTraceEnabled
public boolean isTraceEnabled()Description copied from interface:LogIs the 'trace' log level enabled?- Specified by:
isTraceEnabledin interfaceLog- Returns:
- true if so.
-
isWarnEnabled
public boolean isWarnEnabled()Description copied from interface:LogIs the 'warn' log level enabled?- Specified by:
isWarnEnabledin interfaceLog- Returns:
- true if so.
-
logDebug
public void logDebug(java.lang.Object message)Logs the given message instance using the 'debug' level -
logDebug
public void logDebug(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'debug' level. -
logError
public void logError(java.lang.Object message)Logs the given message instance using the 'error' level -
logError
public void logError(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'error' level. -
logFatal
public void logFatal(java.lang.Object message)Logs the given message instance using the 'fatal' level -
logFatal
public void logFatal(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'fatal' level. -
logInfo
public void logInfo(java.lang.Object message)Logs the given message instance using the 'info' level -
logInfo
public void logInfo(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'info' level. -
logTrace
public void logTrace(java.lang.Object message)Logs the given message instance using the 'trace' level -
logTrace
public void logTrace(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'trace' level. -
logWarn
public void logWarn(java.lang.Object message)Logs the given message instance using the 'warn' level -
logWarn
public void logWarn(java.lang.Object message, java.lang.Throwable exception)Logs the given message and Throwable at the 'warn' level. -
logInternal
protected java.lang.String logInternal(int level, java.lang.Object msg, java.lang.Throwable exception)
-