in.srain.cube.util
Class CLog

java.lang.Object
  extended by in.srain.cube.util.CLog

public class CLog
extends Object

An encapsulation of Log, enable log level and print log with parameters.

Author:
http://www.liaohuqiu.net/

Field Summary
static int LEVEL_DEBUG
           
static int LEVEL_ERROR
           
static int LEVEL_FATAL
           
static int LEVEL_INFO
           
static int LEVEL_VERBOSE
           
static int LEVEL_WARNING
           
 
Constructor Summary
CLog()
           
 
Method Summary
static void d(String tag, String msg)
          Send a DEBUG log message
static void d(String tag, String msg, Object... args)
          Send a DEBUG log message
static void d(String tag, String msg, Throwable throwable)
          Send a DEBUG log message
static void e(String tag, String msg)
          Send an ERROR log message
static void e(String tag, String msg, Object... args)
          Send an ERROR log message
static void e(String tag, String msg, Throwable throwable)
          Send an ERROR log message
static void f(String tag, String msg)
          Send a FATAL ERROR log message
static void f(String tag, String msg, Object... args)
          Send a FATAL ERROR log message
static void f(String tag, String msg, Throwable throwable)
          Send a FATAL ERROR log message
static void i(String tag, String msg)
          Send an INFO log message
static void i(String tag, String msg, Object... args)
          Send an INFO log message
static void i(String tag, String msg, Throwable throwable)
          Send an INFO log message
static void setLogLevel(int level)
          set log level, the level lower than this level will not be logged
static void v(String tag, String msg)
          Send a VERBOSE log message.
static void v(String tag, String msg, Object... args)
          Send a VERBOSE log message.
static void v(String tag, String msg, Throwable throwable)
          Send a VERBOSE log message.
static void w(String tag, String msg)
          Send a WARNING log message
static void w(String tag, String msg, Object... args)
          Send a WARNING log message
static void w(String tag, String msg, Throwable throwable)
          Send a WARNING log message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEVEL_VERBOSE

public static final int LEVEL_VERBOSE
See Also:
Constant Field Values

LEVEL_DEBUG

public static final int LEVEL_DEBUG
See Also:
Constant Field Values

LEVEL_INFO

public static final int LEVEL_INFO
See Also:
Constant Field Values

LEVEL_WARNING

public static final int LEVEL_WARNING
See Also:
Constant Field Values

LEVEL_ERROR

public static final int LEVEL_ERROR
See Also:
Constant Field Values

LEVEL_FATAL

public static final int LEVEL_FATAL
See Also:
Constant Field Values
Constructor Detail

CLog

public CLog()
Method Detail

setLogLevel

public static void setLogLevel(int level)
set log level, the level lower than this level will not be logged

Parameters:
level -

v

public static void v(String tag,
                     String msg)
Send a VERBOSE log message.

Parameters:
tag -
msg -

v

public static void v(String tag,
                     String msg,
                     Throwable throwable)
Send a VERBOSE log message.

Parameters:
tag -
msg -
throwable -

v

public static void v(String tag,
                     String msg,
                     Object... args)
Send a VERBOSE log message.

Parameters:
tag -
msg -
args -

d

public static void d(String tag,
                     String msg)
Send a DEBUG log message

Parameters:
tag -
msg -

d

public static void d(String tag,
                     String msg,
                     Object... args)
Send a DEBUG log message

Parameters:
tag -
msg -
args -

d

public static void d(String tag,
                     String msg,
                     Throwable throwable)
Send a DEBUG log message

Parameters:
tag -
msg -
throwable -

i

public static void i(String tag,
                     String msg)
Send an INFO log message

Parameters:
tag -
msg -

i

public static void i(String tag,
                     String msg,
                     Object... args)
Send an INFO log message

Parameters:
tag -
msg -
args -

i

public static void i(String tag,
                     String msg,
                     Throwable throwable)
Send an INFO log message

Parameters:
tag -
msg -

w

public static void w(String tag,
                     String msg)
Send a WARNING log message

Parameters:
tag -
msg -

w

public static void w(String tag,
                     String msg,
                     Object... args)
Send a WARNING log message

Parameters:
tag -
msg -
args -

w

public static void w(String tag,
                     String msg,
                     Throwable throwable)
Send a WARNING log message

Parameters:
tag -
msg -
throwable -

e

public static void e(String tag,
                     String msg)
Send an ERROR log message

Parameters:
tag -
msg -

e

public static void e(String tag,
                     String msg,
                     Object... args)
Send an ERROR log message

Parameters:
tag -
msg -
args -

e

public static void e(String tag,
                     String msg,
                     Throwable throwable)
Send an ERROR log message

Parameters:
tag -
msg -
throwable -

f

public static void f(String tag,
                     String msg)
Send a FATAL ERROR log message

Parameters:
tag -
msg -

f

public static void f(String tag,
                     String msg,
                     Object... args)
Send a FATAL ERROR log message

Parameters:
tag -
msg -
args -

f

public static void f(String tag,
                     String msg,
                     Throwable throwable)
Send a FATAL ERROR log message

Parameters:
tag -
msg -
throwable -


Copyright © 2014 Huqiu Liao. All Rights Reserved.