|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.bootstrep.Utilities.Logger
public class Logger
This Class is responsible for writing log messages
to a given printstream. This class is under re-engineering. So far, only log levels 0 and 3,
i. e. minimum and maximum have been completely implemented.
Use the void constructor to pass logLevel dinamically to
methods, otherwise the maximum level will be used.
If You use the Logger(Int) constructor, you set the logLevel at the start of the process.
| Field Summary | |
|---|---|
(package private) ListBean |
LB
|
(package private) Variables |
LOV
An instance of Variable Class |
| Constructor Summary | |
|---|---|
Logger()
Creates a new instance of Logger log level is read from property file |
|
Logger(java.io.PrintStream out,
java.lang.String className)
Creates a new instance of Logger Class: The loglevel is maximum and overrides the logLevel global value read from property file. |
|
| Method Summary | |
|---|---|
static void |
debugArray(java.io.PrintStream out,
java.lang.Integer tab,
java.lang.String errCod,
java.lang.String[] inputArr,
java.lang.String arrayName)
This method writes debug messages for arrays to PrintStream |
static void |
debugFunction(java.io.PrintStream out,
java.lang.Integer tab,
java.lang.String errCod,
java.lang.String funcName,
java.lang.String message)
This method writes down log messages to a given PrintStream. This method is called by framework when log level is max (3) |
void |
debugList(java.io.PrintStream out,
java.lang.Integer tabmess,
java.lang.Integer tab,
java.lang.String errCod,
java.lang.Integer opt)
This method debug lists. |
private static java.lang.String |
getIndentSpaces(int indent)
This method appends some spaces to the buffer to indent the output |
void |
logClass(java.io.PrintStream out,
java.lang.String className,
java.lang.String param)
This method is used to log only the name of classes used |
static void |
logWrite(java.io.PrintStream out,
java.lang.String errCod,
java.lang.String strLog)
This method is called when log level is INFO ( 1 ) |
void |
macroLog(java.io.PrintStream out,
java.lang.String operation,
java.lang.String date)
This method writes down only macro steps, i.e. |
java.lang.String[] |
setMessagesToLog(java.lang.String funcName,
java.lang.String tab,
java.lang.String Message,
java.lang.String errCode,
java.lang.String strLog,
java.lang.String logCode)
This method writes log messages. |
void |
toggleLevel(java.io.PrintStream out,
java.lang.Integer logLevel,
java.lang.String[] messages)
This method toggles between different log levels |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
Variables LOV
ListBean LB
| Constructor Detail |
|---|
public Logger()
public Logger(java.io.PrintStream out,
java.lang.String className)
className - name of the classout - The printstream| Method Detail |
|---|
public java.lang.String[] setMessagesToLog(java.lang.String funcName,
java.lang.String tab,
java.lang.String Message,
java.lang.String errCode,
java.lang.String strLog,
java.lang.String logCode)
logCode - The log levelfuncName - The function which call this methodtab - The indentation for the log formatMessage - Message to be erittenerrCode - Error codestrLog - A brief log string
public void toggleLevel(java.io.PrintStream out,
java.lang.Integer logLevel,
java.lang.String[] messages)
out - Output PrintStreamlogLevel - The level of log: values plan=0,info=1,warning=2,debug=3messages - An Array to be formatted:
private static java.lang.String getIndentSpaces(int indent)
indent - Space amount to buffer
public static void debugFunction(java.io.PrintStream out,
java.lang.Integer tab,
java.lang.String errCod,
java.lang.String funcName,
java.lang.String message)
out - output printStreamtab - tab is an indentation for outputerrCod - code of the error. The value is store in global variablesfuncName - The function which is under debugmessage - The message to display
public static void logWrite(java.io.PrintStream out,
java.lang.String errCod,
java.lang.String strLog)
out - Output PrintStreamerrCod - The code of the error: the value is stored in global variablesstrLog - The message to display
public static void debugArray(java.io.PrintStream out,
java.lang.Integer tab,
java.lang.String errCod,
java.lang.String[] inputArr,
java.lang.String arrayName)
out - The printstreamtab - The indentation in the log formaterrCod - The error codeinputArr - The input ArrayarrayName - The name of the input array
public void logClass(java.io.PrintStream out,
java.lang.String className,
java.lang.String param)
out - PrintStreamclassName - Class nameparam - parameter
public void macroLog(java.io.PrintStream out,
java.lang.String operation,
java.lang.String date)
out - The PrintStreamoperation - The type of operationdate - The date of operation
public void debugList(java.io.PrintStream out,
java.lang.Integer tabmess,
java.lang.Integer tab,
java.lang.String errCod,
java.lang.Integer opt)
out - The PrintStreamtabmess - The indentation of the messagetab - Another indentationerrCod - the error codeopt - An option to display specific types of lists
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||