com.github.drinkjava2.jtransactions.tinytx
Class TinyTxLogger

java.lang.Object
  extended by com.github.drinkjava2.jtransactions.tinytx.TinyTxLogger

public class TinyTxLogger
extends Object

For logger output, to avoid logger jar version conflict, default use JDK log, if found commons log, use it, if found Log4j use it..., by this way this project has no dependency to any logger jar.

Since:
1.0.0
Author:
Yong Zhu

Field Summary
static TinyTxLogger INSTANCE
           
 
Constructor Summary
TinyTxLogger(Class<?> targetClass)
           
 
Method Summary
 void error(String msg)
           
static TinyTxLogger getLog(Class<?> targetClass)
          Build a TinyTxLogger instance by given targetClass
 void info(String msg)
           
static void setEnableLog(boolean enablelog)
           
 void warn(String msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static TinyTxLogger INSTANCE
Constructor Detail

TinyTxLogger

public TinyTxLogger(Class<?> targetClass)
Method Detail

getLog

public static TinyTxLogger getLog(Class<?> targetClass)
Build a TinyTxLogger instance by given targetClass

Parameters:
targetClass -
Returns:
A TinyTxLogger instance

setEnableLog

public static void setEnableLog(boolean enablelog)

info

public void info(String msg)

warn

public void warn(String msg)

error

public void error(String msg)


Copyright © 2018. All rights reserved.