You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Mariia Mykhailova (JIRA)" <ji...@apache.org> on 2016/09/28 00:14:20 UTC

[jira] [Created] (REEF-1623) Remove double-logging exception in Logger.Log(Exception)

Mariia Mykhailova created REEF-1623:
---------------------------------------

             Summary: Remove double-logging exception in Logger.Log(Exception)
                 Key: REEF-1623
                 URL: https://issues.apache.org/jira/browse/REEF-1623
             Project: REEF
          Issue Type: Improvement
          Components: REEF.NET
            Reporter: Mariia Mykhailova
            Assignee: Mariia Mykhailova
            Priority: Minor


Currently {{Logger.Log(Level level, string msg, Exception exception)}} logs exception twice: first as {{exception}} and second as {{exception.Message}}+{{exception.StackTrace}}.

{noformat}
                exceptionLog = string.Format(
                    CultureInfo.InvariantCulture,
                    "encountered error [{0}] with mesage [{1}] and stack trace [{2}]",
                    exception,
                    exception.Message,
                    exception.StackTrace);
{noformat}

The result is confusing and should contain the error only once

{noformat}
41065 ERROR: ExceptionCaught ArgumentNullException Exception in disposing Task but ignoring as Task has already completed.encountered error [System.ArgumentNullException: Value cannot be null.
41066 Parameter name: Simulating task failure
41067    at Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce.FaultTolerantPipelinedBroadcastAndReduce.TestSenderMapFunction.SimulateFailure(Int32 onIteration)
41068    at Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce.FaultTolerantPipelinedBroadcastAndReduce.TestSenderMapFunction.Dispose()
41069    at Org.Apache.REEF.IMRU.OnREEF.IMRUTasks.MapTaskHost`2.Dispose()
41070    at Org.Apache.REEF.Common.Runtime.Evaluator.Task.TaskRuntime.<StartTaskOnNewThread>b__16_0()] with mesage [Value cannot be null.
41071 Parameter name: Simulating task failure] and stack trace [   at Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce.FaultTolerantPipelinedBroadcastAndReduce.TestSenderMapFunction.SimulateFailure(Int32 onIteration)
41072    at Org.Apache.REEF.IMRU.Examples.PipelinedBroadcastReduce.FaultTolerantPipelinedBroadcastAndReduce.TestSenderMapFunction.Dispose()
41073    at Org.Apache.REEF.IMRU.OnREEF.IMRUTasks.MapTaskHost`2.Dispose()
41074    at Org.Apache.REEF.Common.Runtime.Evaluator.Task.TaskRuntime.<StartTaskOnNewThread>b__16_0()]
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)