Logging

AgentScape uses Apache Commons Logging to produce log files from the middleware, services and agents. Agents and Services use separate logger categories (kernel, middleware, systemservice, service and agent) which can be used to log messages to the service specific log file. A log directory is created for each invidual host, containing the log files per working directory.

For each agent and service, a default logger is initialized upon startup. An agent can use getLog() to fetch the logger. Services can access the log variable directly. These default loggers only log to the category file: logs for all agents on a host end up the same log file.

If you like more extensive configuration, you can supply your own Log4j configuration at AgentScape startup. At the moment, a JVM argument is needed to point to a specific configuration file.

-Dlog4j.configuration=/path/to/config.xml
usage/logging.txt · Last modified: 2012/07/02 14:44 by reinier