|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanet.simulate.Logger
public class Logger
Field Summary | |
---|---|
static int |
ERROR_LOG
Logger level: Only permits to show error logs. |
static int |
EVENT_LOG
Logger level: Permits to show event logs. |
static int |
MSG_LOG
Logger level: The less restrictive level of logs. |
static int |
PRINT_LOG
Logger level: Permits to show a bigger number of logs. |
Constructor Summary | |
---|---|
Logger()
|
Method Summary | |
---|---|
static int |
getStep()
Gets the actual step in run. |
static void |
log(java.lang.Object obj,
java.lang.String msg,
java.lang.Object obj2,
int lvl)
Logs the following string: obj + msg + obj2 |
static void |
log(java.lang.String[] msgs,
java.lang.Object[] objs,
int lvl)
Logs a combination of the arguments. |
static void |
log(java.lang.String msg,
int lvl)
Logs a message msg with level lvl . |
static void |
log(java.lang.String msg,
int p1,
java.lang.String msg1,
int lvl)
Logs a string combining arguments as following: msg + p1 + msg1 |
static void |
log(java.lang.String msg,
java.lang.Object obj,
int lvl)
Logs any object. |
static void |
log(java.lang.String msg,
java.lang.Object obj,
java.lang.String msg2,
int lvl)
Logs the following string: msg + obj + msg2 |
static void |
logReceive(Id id,
RouteMessage msg,
int lvl)
Logs a received RouteMessage |
static void |
logSend(Id id,
RouteMessage msg,
int lvl)
Logs a sent RouteMessage. |
static void |
setLevel(int lvl)
Sets the level of logs to be applied. |
static void |
setStep(int time)
Sets the actual step in run. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERROR_LOG
public static final int EVENT_LOG
public static final int PRINT_LOG
public static final int MSG_LOG
Constructor Detail |
---|
public Logger()
Method Detail |
---|
public static void setLevel(int lvl)
lvl
- Level of logs to apply.public static void setStep(int time)
time
- Actual step in run.public static int getStep()
public static void log(java.lang.String msg, int lvl)
msg
- Message to be log.lvl
- Priority of the log.public static void log(java.lang.String msg, int p1, java.lang.String msg1, int lvl)
msg + p1 + msg1
msg
- First fragment of the message.p1
- int value to be log in second term.msg1
- Last fragment of the message.lvl
- Priority of the message.public static void logSend(Id id, RouteMessage msg, int lvl)
id
- Related Id for the RouteMessage.msg
- RouteMessage to be log.lvl
- Priority of the message.public static void logReceive(Id id, RouteMessage msg, int lvl)
id
- Related Id of the RouteMessage.msg
- RouteMessage to be log.lvl
- Priority of the log.public static void log(java.lang.String msg, java.lang.Object obj, int lvl)
msg
- String to be logged first.obj
- Object to be logged at last (using obj.toString()).lvl
- Priority of the log.public static void log(java.lang.Object obj, java.lang.String msg, java.lang.Object obj2, int lvl)
obj + msg + obj2
obj
- First object to be logged.msg
- Message to be logged at second term.obj2
- Last object to be logged.lvl
- Priority of the log.public static void log(java.lang.String msg, java.lang.Object obj, java.lang.String msg2, int lvl)
msg + obj + msg2
msg
- Message to be logged at first.obj
- Object to be logged at second term.msg2
- Message to be logged at last.lvl
- Priority of the log.public static void log(java.lang.String[] msgs, java.lang.Object[] objs, int lvl)
for (int i = 0; i < msgs.length; i++) { result = result + msgs[i] + objs[i]; }and logs the result string.
msgs
- String to be used in combination.objs
- Objects to be used in combination.lvl
- Priority of the log.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |