GridSim 5.0 beta

gridsim.parallel.log
Class Logging

Object
  extended by Logging

public class Logging
extends Object

Implements default logging behaviour in case the user does not specify any.

Author:
Marcos Dias de Assuncao

Method Summary
static Logger getLogger(LoggerEnum log)
          Returns the corresponding log object.
 void readConfiguration(InputStream ins)
          Reinitialise the logging properties and reread the logging configuration from the given stream, which should be in Properties format.
static void setLevel(Level lv)
          Sets the logging level for all default loggers.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLogger

public static Logger getLogger(LoggerEnum log)
Returns the corresponding log object.

Parameters:
log - the path of logger
Returns:
the logger object

setLevel

public static void setLevel(Level lv)
Sets the logging level for all default loggers.

Parameters:
lv - the logging level

readConfiguration

public void readConfiguration(InputStream ins)
                       throws IOException,
                              SecurityException
Reinitialise the logging properties and reread the logging configuration from the given stream, which should be in Properties format.

Any log level definitions in the new configuration file will be applied using Logger.setLevel(), if the target Logger exists.

Parameters:
ins - stream to read properties from
Throws:
IOException - if there are problems reading from the stream.
SecurityException - if a security manager exists and if the caller does not have LoggingPermission("control").

GridSim 5.0 beta

The University of Melbourne, Australia, 2009