cz.cuni.amis.pogamut.base.utils.logging
Interface ILogCategories

Package class diagram package ILogCategories
All Known Implementing Classes:
AbstractLogCategories, JMXLogCategories, LogCategories, LogCategoriesJMXProxy

public interface ILogCategories


Method Summary
 void addLogCategory(String name, LogCategory category)
          Adds log category from outside of the object.
 Map<String,LogCategory> getCategories()
          Returns IMMUTABLE mapping of categories names to instances of those log categories.
 LogCategory getCategory(String name)
          Returns existing category by the name or adds new one.
 String[] getCategoryNames()
          Returns names of all existing log categories.
 String[] getCategoryNamesSorted()
          Returns names of all existing log categories sorted alphabetically.
 boolean hasCategory(String name)
          Whether some category with specified name exists.
 void setLevel(Level newLevel)
          Set level for all handlers of all categories.
 

Method Detail

hasCategory

boolean hasCategory(String name)
Whether some category with specified name exists.

Parameters:
name -
Returns:

getCategories

Map<String,LogCategory> getCategories()
Returns IMMUTABLE mapping of categories names to instances of those log categories.

It does not contain instance of IAgentLogger.

Returns:

addLogCategory

void addLogCategory(String name,
                    LogCategory category)
Adds log category from outside of the object.

Parameters:
name -
category -

getCategoryNames

String[] getCategoryNames()
Returns names of all existing log categories.

Returns:

getCategoryNamesSorted

String[] getCategoryNamesSorted()
Returns names of all existing log categories sorted alphabetically.

Returns:

getCategory

LogCategory getCategory(String name)
Returns existing category by the name or adds new one.

Note that new category doesn't have any handler appended, you have to create at least one for the category to produce something.

Example:

LogCategory myCategory = categories.getCategory("my log"); // create new category
myCategory.newHandler(new LogPublisher.ConsolePublisher()); // add new handler with output to the console

Parameters:
name -
Returns:

setLevel

void setLevel(Level newLevel)
Set level for all handlers of all categories.

Parameters:
newLevel -


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.