public class LogCategories extends AbstractLogCategories
The only constructor LogCategories(Logger) is protected and is instantiated
during the construction of AgentLogger.
| Constructor and Description |
|---|
LogCategories() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,LogCategory> |
getCategoriesInternal() |
LogCategory |
getCategory(String name)
Returns existing category by the name or adds new one.
|
addLogCategory, getCategories, getCategoryNames, getCategoryNamesSorted, hasCategory, setLevelpublic LogCategory getCategory(String name)
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"); // creates new category myCategory.newHandler(new LogPublisher.ConsolePublisher()); // adds new handler with output to the console
name - protected Map<String,LogCategory> getCategoriesInternal()
getCategoriesInternal in class AbstractLogCategoriesCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.