[ https://issues.apache.org/jira/browse/QPID-5037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13777452#comment-13777452 ]
Robbie Gemmell commented on QPID-5037: -------------------------------------- HttpManagement ============== The new bits for the REST API are a little unclear because they are so similar (/rest/logfile and /rest/logfiles) and e.g the 'logfile' one allowing for download of multiple logfile*s*. I think we should change them to differentiate them and be a clearer what its for, e.g logfiles and logfilenames respectively. LogFileHelper: ============== May not be able to handle new appenders added while running (depending on how Log4J manages its data structures). Thats probably fine for now though. ..or it may actually not include a log file name...hard to tell anything other than its the wrong format. The values could also be empty strings, shouldn't we guard that? if (paths.length != 2) { throw new IllegalArgumentException("Log file name '" + requestedFiles[i] + "' does not include an appender name"); } String appenderName = paths[0]; String fileName = paths[1]; I think it would be clearer to name these differently rather than rely on the signature change that is only used after first doing the if/else and casting them anyway (and in the case of the later, casting it back in order to use the other method as well...). private List<LogFileDetails> listAppenderFiles(FileAppender appender, boolean includeLogFileLocation) private List<LogFileDetails> listAppenderFiles(QpidCompositeRollingAppender appender, boolean includeLogFileLocation) The above presumably can't handle one appenders file names being a prefix of another appenders, but this is again probably ok for now. If the filename is equal, can we exit the loop? for (LogFileDetails logFileDetails : appenderFiles) { if (logFileDetails.getName().equals(fileName)) { logFiles.add(logFileDetails); } } Does this properly handle files in other folders (e.g the QCRFA 'backup dir' having uncompressed files with the same filename as those in the non-backup dir, or two appenders with the same filenames in different directories) ? It seems to check the name but not the directory matches whats being asked for, could it download the wrong file? LogFileServlet: =============== Magic string literal? String[] requestedFiles = request.getParameterValues("l"); Should we signal attempts to download random files wtih an error other than 404?(e.g if asking for files for an appender that doesnt exist, or asking for files that dont match the prefix of the matching appender) Sure, they werent found, but only because the request was completely bogus. LogFileListingServlet: ===================== The exception message could be clearer, as this servlet isn't actually for downloading log files but rather listing their names. if (!getBroker().getSecurityManager().authoriseLogsAccess()) { response.sendError(HttpServletResponse.SC_FORBIDDEN, "Log files download is denied"); return; } > [Java Broker- Web Management Console] Move log viewer into a separate tab and > add abilities to download logs and filter log entries in the logs table > ----------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: QPID-5037 > URL: https://issues.apache.org/jira/browse/QPID-5037 > Project: Qpid > Issue Type: Improvement > Components: Java Broker > Reporter: Alex Rudyy > Assignee: Alex Rudyy > Fix For: 0.25 > > > Move the log viewer functionality from the Broker tab to its own separate tab > launched from the broker tab. > Add the following functionality into log viewer: > # Ability to download the log files > # Ability for sorting, filtering > # Use of colors to make more visual those rows which meet predefined > conditions (e.g. WARN, ERROR messages) > # Allow dynamic changing of displayed columns -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org