掲示板
Adding loggers from custom portlets
Since Liferay (in this case, Liferay 6.1) has an admin portlet for managing the Log levels and uses Log4JUtil for setting them, I would like to know if you understand why the rest of the custom portlets I am doing can't seem to add new loggers to its list. I have a portlet version in Liferay 6.2, but it uses this following code, which does not work on Liferay 6.1 because LogFactoryUtil doesn't have a getLogFactory() method:
What I tried on Liferay 6.1:
OR
Previous code is not adding anything to the loggers.
PD: My custom portlet tries to show like a console the server logs, and I would like to add loggers too, since server administration can be hidden for certain roles and users.
Any indication would be appreciated.
LogFactoryUtil.getLogFactory().setLevel(loggerName, priority, true);
What I tried on Liferay 6.1:
Logger logger = Logger.getLogger(LogUtils.class);
logger.setLevel(Level.toLevel("DEBUG"));
OR
Log4JUtil.setLevel("com.liferay", "DEBUG", false);
LogManager.getLogger(LogUtils.class).setLevel(Level.DEBUG);
Previous code is not adding anything to the loggers.
PD: My custom portlet tries to show like a console the server logs, and I would like to add loggers too, since server administration can be hidden for certain roles and users.
Any indication would be appreciated.