Setting @deprecated on the anonymous (non-named) Log usage.
This commit is contained in:
parent
96d46df7da
commit
644694b704
|
@ -73,7 +73,7 @@ public class Log
|
|||
|
||||
try
|
||||
{
|
||||
Class log_class = Loader.loadClass(Log.class, __logClass);
|
||||
Class<?> log_class = Loader.loadClass(Log.class, __logClass);
|
||||
if (__log == null || !__log.getClass().equals(log_class))
|
||||
{
|
||||
__log = (Logger)log_class.newInstance();
|
||||
|
@ -94,7 +94,7 @@ public class Log
|
|||
|
||||
private static void initStandardLogging(Throwable e)
|
||||
{
|
||||
Class log_class;
|
||||
Class<?> log_class;
|
||||
if(e != null && __ignored)
|
||||
e.printStackTrace();
|
||||
if (__log == null)
|
||||
|
@ -110,12 +110,19 @@ public class Log
|
|||
Log.__log = log;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static Logger getLog()
|
||||
{
|
||||
initialized();
|
||||
return __log;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
static boolean isIgnored()
|
||||
{
|
||||
return __ignored;
|
||||
|
@ -159,6 +166,10 @@ public class Log
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void debug(Throwable th)
|
||||
{
|
||||
if (!isDebugEnabled())
|
||||
|
@ -166,6 +177,10 @@ public class Log
|
|||
__log.debug(EXCEPTION, th);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void debug(String msg)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -173,6 +188,10 @@ public class Log
|
|||
__log.debug(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void debug(String msg, Object arg)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -180,6 +199,10 @@ public class Log
|
|||
__log.debug(msg, arg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void debug(String msg, Object arg0, Object arg1)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -192,6 +215,10 @@ public class Log
|
|||
* This works around the problem that log4j does not support the trace level.
|
||||
* @param thrown the Throwable to ignore
|
||||
*/
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void ignore(Throwable thrown)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -202,6 +229,10 @@ public class Log
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void info(String msg)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -209,6 +240,10 @@ public class Log
|
|||
__log.info(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void info(String msg, Object arg)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -216,6 +251,10 @@ public class Log
|
|||
__log.info(msg, arg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void info(String msg, Object arg0, Object arg1)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -223,6 +262,10 @@ public class Log
|
|||
__log.info(msg, arg0, arg1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean isDebugEnabled()
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -230,6 +273,10 @@ public class Log
|
|||
return __log.isDebugEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void warn(String msg)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -237,6 +284,10 @@ public class Log
|
|||
__log.warn(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void warn(String msg, Object arg)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -244,6 +295,10 @@ public class Log
|
|||
__log.warn(msg, arg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void warn(String msg, Object arg0, Object arg1)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -251,6 +306,10 @@ public class Log
|
|||
__log.warn(msg, arg0, arg1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void warn(String msg, Throwable th)
|
||||
{
|
||||
if (!initialized())
|
||||
|
@ -258,6 +317,10 @@ public class Log
|
|||
__log.warn(msg, th);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated anonymous logging is deprecated, use a named {@link Logger} obtained from {@link #getLogger(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static void warn(Throwable th)
|
||||
{
|
||||
if (!initialized())
|
||||
|
|
Loading…
Reference in New Issue