public class LogCategoriesJMXProxy extends AbstractLogCategories
| Constructor and Description |
|---|
LogCategoriesJMXProxy(MBeanServerConnection mbsc,
ObjectName parentName) |
| 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.
|
String[] |
getCategoryNames()
Returns names of all existing log categories.
|
addLogCategory, getCategories, getCategoryNamesSorted, hasCategory, setLevelpublic LogCategoriesJMXProxy(MBeanServerConnection mbsc, ObjectName parentName) throws cz.cuni.amis.utils.exception.PogamutJMXException
cz.cuni.amis.utils.exception.PogamutJMXExceptionprotected Map<String,LogCategory> getCategoriesInternal()
getCategoriesInternal in class AbstractLogCategoriespublic LogCategory getCategory(String name)
ILogCategoriesNote 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
public String[] getCategoryNames()
AbstractLogCategoriesgetCategoryNames in interface ILogCategoriesgetCategoryNames in class AbstractLogCategoriesCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.