use of com.zimbra.common.util.AccountLogger in project zm-mailbox by Zimbra.
the class GetAccountLoggers method handle.
@Override
public Element handle(Element request, Map<String, Object> context) throws ServiceException {
ZimbraSoapContext zsc = getZimbraSoapContext(context);
Server localServer = Provisioning.getInstance().getLocalServer();
checkRight(zsc, context, localServer, Admin.R_manageAccountLogger);
// Look up account
Account account = AddAccountLogger.getAccountFromLoggerRequest(request);
Element response = zsc.createElement(AdminConstants.GET_ACCOUNT_LOGGERS_RESPONSE);
for (AccountLogger al : LogFactory.getAllAccountLoggers()) {
if (al.getAccountName().equals(account.getName())) {
Element eLogger = response.addElement(AdminConstants.E_LOGGER);
eLogger.addAttribute(AdminConstants.A_CATEGORY, al.getCategory());
eLogger.addAttribute(AdminConstants.A_LEVEL, al.getLevel().toString());
}
}
return response;
}
Aggregations