com.deepshiftlabs.nerrvana
Class Logger

java.lang.Object
  extended by com.deepshiftlabs.nerrvana.Logger

public class Logger
extends Object

Performs logging into Jenkins console log

Version:
1.00
Author:
Deep Shift Labs, Victor Orlov

Field Summary
static int LL_NORMAL
           
static int LL_TRACE
           
 
Method Summary
static void exception(Throwable e)
          Logs exception.
 int getLevel()
           
static void info(String s)
           
static void infoln(String s)
           
static void init(PrintStream logger, String loglevel)
           
 void setLevel(int iLogLevel)
           
static void tori(String trace, String normal)
          Logs string depending on the actual log level.
static void trace(String s)
           
static void traceln(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LL_NORMAL

public static final int LL_NORMAL
See Also:
Constant Field Values

LL_TRACE

public static final int LL_TRACE
See Also:
Constant Field Values
Method Detail

init

public static void init(PrintStream logger,
                        String loglevel)

getLevel

public int getLevel()

setLevel

public void setLevel(int iLogLevel)

info

public static void info(String s)

trace

public static void trace(String s)

infoln

public static void infoln(String s)

traceln

public static void traceln(String s)

exception

public static void exception(Throwable e)
Logs exception. Also tries to determine if exception has been caused by some XML failure (unparseable XML or wrong XML) and logs last XML document as well.

Parameters:
e - exception to log

tori

public static void tori(String trace,
                        String normal)
Logs string depending on the actual log level. This helper function allows to specify short message for normal logging and extended message for trace

Parameters:
trace - string to log if current log level == LL_TRACE
normal - string to log if current log level == LL_NORMAL


Copyright © 2004-2012 Deep Shift Labs. All Rights Reserved.