JSONObject appendersJSON = new JSONObject();
appendersJSON.put(ProtocolConstants.KEY_CHILDREN, new JSONArray());
for (RollingFileAppender<ILoggingEvent> appender : appenders) {
RollingFileAppenderResource rollingFileAppender = new RollingFileAppenderResource(
appender, baseLocation);
if (rollingFileAppender.getArchivedLogFiles() == null)
LogUtils.attachArchivedLogFiles(appender,
rollingFileAppender, logService);
appendersJSON.append(ProtocolConstants.KEY_CHILDREN,
rollingFileAppender.toJSON());
}
return new ServerStatus(Status.OK_STATUS,
HttpServletResponse.SC_OK, appendersJSON);