[ https://issues.apache.org/jira/browse/OODT-693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528805#comment-16528805 ]
ASF GitHub Bot commented on OODT-693: ------------------------------------- Github user chrismattmann commented on a diff in the pull request: https://github.com/apache/oodt/pull/66#discussion_r199326290 --- Diff: pge/src/main/java/org/apache/oodt/cas/pge/PGETaskInstance.java --- @@ -135,30 +148,27 @@ public void run(Metadata metadata, WorkflowTaskConfiguration config) throws Work // Commit dynamic metadata. updateDynamicMetadata(); } catch (Exception e) { - logger.log(Level.SEVERE, "PGETask FAILED!!! : " + e.getMessage(), e); - throw new WorkflowTaskInstanceException("PGETask FAILED!!! : " - + e.getMessage(), e); + logger.error("PGETask FAILED!!! Error occurred when running", e); + throw new WorkflowTaskInstanceException("PGETask FAILED!!! : " + e.getMessage(), e); } } protected void updateStatus(String status) throws Exception { logger.info("Updating status to workflow as [" + status + "]"); if (!getWorkflowManagerClient().updateWorkflowInstanceStatus(workflowInstId, status)) { - throw new PGEException( - "Failed to update workflow status : client returned false"); + throw new PGEException("Failed to update workflow status : client returned false"); } } - protected Logger createLogger() throws IOException, PGEException { + protected java.util.logging.Logger createLogger() throws IOException, PGEException { File logDir = new File(pgeConfig.getExeDir(), "logs"); if (!(logDir.exists() || logDir.mkdirs())) { throw new PGEException("mkdirs for logs directory return false"); } - Logger logger = Logger.getLogger(PGETaskInstance.class.getName() - + "." + workflowInstId); - FileHandler handler = new FileHandler( - new File(logDir, createLogFileName()).getAbsolutePath()); + java.util.logging.Logger logger = java.util.logging.Logger.getLogger(PGETaskInstance.class.getName() + "." + workflowInstId); + // TODO Need to find an alternative way to add a dynamic handler to write workflowInstance logs to a separate file --- End diff -- create a JIRA issue for this > Consolidate logging in OODT > --------------------------- > > Key: OODT-693 > URL: https://issues.apache.org/jira/browse/OODT-693 > Project: OODT > Issue Type: Improvement > Components: file manager > Affects Versions: 0.6 > Reporter: Lewis John McGibbney > Priority: Major > Fix For: 1.1 > > > Right now we seem to be using an array of inconsistent logging frameworks. > Personally I really like the Slf4j over Log4j setup. Extremely easy to work > with, easy to configure and Log4j 2.X is dynamite so if we can implement that > then we are laughing. > This is by no means a trivial task. > It is however an important one. -- This message was sent by Atlassian JIRA (v7.6.3#76005)