goldengate.common.logging
Class GgInternalLogger
java.lang.Object
goldengate.common.logging.GgInternalLogger
- All Implemented Interfaces:
- org.jboss.netty.logging.InternalLogger
- Direct Known Subclasses:
- GgJdkLogger, GgSlf4JLogger
public abstract class GgInternalLogger
- extends Object
- implements org.jboss.netty.logging.InternalLogger
Logger inspired from Netty implementation, adding some extra commands that
allow to limit the overhead of some ignored logger calls (toString or string
construction is called only if necessary).
Based on The Netty Project (netty-dev@lists.jboss.org)
- Author:
- Trustin Lee (tlee@redhat.com), Frederic Bregier
Method Summary |
abstract void |
debug(String format,
Object arg1)
|
abstract void |
debug(String format,
Object arg1,
Object arg2)
|
abstract void |
debug(String format,
String arg1)
|
abstract void |
debug(String format,
String arg1,
String arg2)
|
abstract void |
error(String format,
Object arg1)
|
abstract void |
error(String format,
Object arg1,
Object arg2)
|
abstract void |
error(String format,
String arg1)
|
abstract void |
error(String format,
String arg1,
String arg2)
|
static String |
getImmediateMethodAndLine()
To be used in message for logger (rank 2) like
logger.warn(code,"message:"+getImmediateMethodAndLine(),null); |
protected static String |
getLoggerMethodAndLine()
To be used only by Logger (rank 5) |
static String |
getRankMethodAndLine(int rank)
|
abstract void |
info(String format,
Object arg1)
|
abstract void |
info(String format,
Object arg1,
Object arg2)
|
abstract void |
info(String format,
String arg1)
|
abstract void |
info(String format,
String arg1,
String arg2)
|
boolean |
isEnabled(org.jboss.netty.logging.InternalLogLevel level)
|
void |
log(org.jboss.netty.logging.InternalLogLevel level,
String msg)
|
void |
log(org.jboss.netty.logging.InternalLogLevel level,
String msg,
Throwable cause)
|
abstract void |
warn(String format,
Object arg1)
|
abstract void |
warn(String format,
Object arg1,
Object arg2)
|
abstract void |
warn(String format,
String arg1)
|
abstract void |
warn(String format,
String arg1,
String arg2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.netty.logging.InternalLogger |
debug, debug, error, error, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, warn, warn |
GgInternalLogger
public GgInternalLogger()
getImmediateMethodAndLine
public static String getImmediateMethodAndLine()
- To be used in message for logger (rank 2) like
logger.warn(code,"message:"+getImmediateMethodAndLine(),null);
- Returns:
- "ClassAndMethodName(FileName:LineNumber)"
getLoggerMethodAndLine
protected static String getLoggerMethodAndLine()
- To be used only by Logger (rank 5)
- Returns:
- "MethodName(FileName:LineNumber)"
getRankMethodAndLine
public static String getRankMethodAndLine(int rank)
- Parameters:
rank
- is the current depth of call+1 (immediate = 1+1=2)
- Returns:
- "ClassAndMethodName(FileName:LineNumber)"
isEnabled
public boolean isEnabled(org.jboss.netty.logging.InternalLogLevel level)
- Specified by:
isEnabled
in interface org.jboss.netty.logging.InternalLogger
- Parameters:
level
-
- Returns:
- True if the level is enabled
log
public void log(org.jboss.netty.logging.InternalLogLevel level,
String msg,
Throwable cause)
- Specified by:
log
in interface org.jboss.netty.logging.InternalLogger
log
public void log(org.jboss.netty.logging.InternalLogLevel level,
String msg)
- Specified by:
log
in interface org.jboss.netty.logging.InternalLogger
debug
public abstract void debug(String format,
String arg1)
- Parameters:
format
- arg1
-
info
public abstract void info(String format,
String arg1)
- Parameters:
format
- arg1
-
warn
public abstract void warn(String format,
String arg1)
- Parameters:
format
- arg1
-
error
public abstract void error(String format,
String arg1)
- Parameters:
format
- arg1
-
debug
public abstract void debug(String format,
String arg1,
String arg2)
- Parameters:
format
- arg1
- arg2
-
info
public abstract void info(String format,
String arg1,
String arg2)
- Parameters:
format
- arg1
- arg2
-
warn
public abstract void warn(String format,
String arg1,
String arg2)
- Parameters:
format
- arg1
- arg2
-
error
public abstract void error(String format,
String arg1,
String arg2)
- Parameters:
format
- arg1
- arg2
-
debug
public abstract void debug(String format,
Object arg1,
Object arg2)
- Parameters:
format
- arg1
- arg2
-
info
public abstract void info(String format,
Object arg1,
Object arg2)
- Parameters:
format
- arg1
- arg2
-
warn
public abstract void warn(String format,
Object arg1,
Object arg2)
- Parameters:
format
- arg1
- arg2
-
error
public abstract void error(String format,
Object arg1,
Object arg2)
- Parameters:
format
- arg1
- arg2
-
debug
public abstract void debug(String format,
Object arg1)
- Parameters:
format
- arg1
-
info
public abstract void info(String format,
Object arg1)
- Parameters:
format
- arg1
-
warn
public abstract void warn(String format,
Object arg1)
- Parameters:
format
- arg1
-
error
public abstract void error(String format,
Object arg1)
- Parameters:
format
- arg1
-
Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.