Unverified Commit 14c8162d authored by Adam Paquette's avatar Adam Paquette Committed by GitHub
Browse files

addLogGroup Depricated (#5511)

* Fixed app logging for all call able apps

* Exposed error formatting and file line reporting flags on preference class

* Updates IException to use the exposed Preference flags

* Application handles adding program name to error

* Initial round of test fixes

* Fixed last 3 failing gtests

* Fixed AppendAndLog function uses

* Caught another missused AppendAndLog call

* Fixed last failing gtest

* Fixed output from getsn

* Fixed mosrange test failures

* Removed depricated method from PvlObject

* Update recent app conversions to use the new function

* Fixed additional addLogGroup calls
parent a2cccf1e
Loading
Loading
Loading
Loading
+6 −8
Original line number Original line Diff line number Diff line
#include "automos.h"
#include "automos.h"
#include "ProcessMapMosaic.h"

#include "Application.h"
#include "FileList.h"
#include "FileList.h"
#include "IException.h"
#include "IException.h"
#include "ProcessMapMosaic.h"
#include "ProjectionFactory.h"
#include "SpecialPixel.h"
#include "SpecialPixel.h"
#include "TProjection.h"
#include "TProjection.h"
#include "ProjectionFactory.h"


using namespace std;
using namespace std;


@@ -77,9 +79,7 @@ namespace Isis {
      if (!m.StartProcess(list[i].toString())) {
      if (!m.StartProcess(list[i].toString())) {
        PvlGroup outsiders("Outside");
        PvlGroup outsiders("Outside");
        outsiders += PvlKeyword("File", list[i].toString());
        outsiders += PvlKeyword("File", list[i].toString());
        if (log) {
        Application::AppendAndLog(outsiders, log);
          log->addLogGroup(outsiders);
        }
      }
      }
      else {
      else {
        mosaicCreated = true;
        mosaicCreated = true;
@@ -94,9 +94,7 @@ namespace Isis {
    }
    }
    // Logs the input file location in the mosaic
    // Logs the input file location in the mosaic
    for (int i = 0; i < m.imagePositions().groups(); i++) {
    for (int i = 0; i < m.imagePositions().groups(); i++) {
      if (log) {
      Application::AppendAndLog(m.imagePositions().group(i), log);
        log->addLogGroup(m.imagePositions().group(i));
      }
    }
    }


    if(olistFlag) {
    if(olistFlag) {
+2 −3
Original line number Original line Diff line number Diff line
#include "cam2map.h"
#include "cam2map.h"


#include "Application.h"
#include "Camera.h"
#include "Camera.h"
#include "CubeAttribute.h"
#include "CubeAttribute.h"
#include "IException.h"
#include "IException.h"
@@ -432,9 +433,7 @@ namespace Isis {
    p.EndProcess();
    p.EndProcess();


    // add mapping to print.prt
    // add mapping to print.prt
    if(log) {
    Application::Log(cleanMapping);
      log->addLogGroup(cleanMapping);
    }


    // Cleanup
    // Cleanup
    delete outmap;
    delete outmap;
+2 −1
Original line number Original line Diff line number Diff line
@@ -3,6 +3,7 @@
#include <string>
#include <string>
#include <iomanip>
#include <iomanip>


#include "Application.h"
#include "Brick.h"
#include "Brick.h"
#include "Camera.h"
#include "Camera.h"
#include "CameraPointInfo.h"
#include "CameraPointInfo.h"
@@ -272,7 +273,7 @@ namespace Isis{
      }
      }


      // we still want to output the results
      // we still want to output the results
      log->addLogGroup((*point));
      Application::AppendAndLog((*point), log);
      delete point;
      delete point;
      point = NULL;
      point = NULL;
    }
    }
+9 −8
Original line number Original line Diff line number Diff line
#include "UserInterface.h"
#include "Application.h"
#include "Camera.h"
#include "Camera.h"
#include "Target.h"
#include "Target.h"
#include "Distance.h"
#include "Distance.h"
#include "Process.h"
#include "Process.h"
#include "Pvl.h"
#include "Pvl.h"
#include "UserInterface.h"


#include "camrange.h"
#include "camrange.h"


@@ -98,13 +99,13 @@ namespace Isis {
    neg180 += PvlKeyword("MinimumLongitude", toString(minlon));
    neg180 += PvlKeyword("MinimumLongitude", toString(minlon));
    neg180 += PvlKeyword("MaximumLongitude", toString(maxlon));
    neg180 += PvlKeyword("MaximumLongitude", toString(maxlon));


    log->addLogGroup(target);
    Application::AppendAndLog(target, log);
    log->addLogGroup(res);
    Application::AppendAndLog(res, log);
    log->addLogGroup(ugr);
    Application::AppendAndLog(ugr, log);
    log->addLogGroup(ogr);
    Application::AppendAndLog(ogr, log);
    log->addLogGroup(pos360);
    Application::AppendAndLog(pos360, log);
    log->addLogGroup(pos180);
    Application::AppendAndLog(pos180, log);
    log->addLogGroup(neg180);
    Application::AppendAndLog(neg180, log);


    // Write the log->file if requested
    // Write the log->file if requested
    if(ui.WasEntered("TO")) {
    if(ui.WasEntered("TO")) {
+3 −1
Original line number Original line Diff line number Diff line


#include "camstats.h"
#include "camstats.h"

#include "Application.h"
#include "Camera.h"
#include "Camera.h"
#include "CameraStatistics.h"
#include "CameraStatistics.h"
#include "Cube.h"
#include "Cube.h"
@@ -51,7 +53,7 @@ namespace Isis {
    // Send the Output to the log area
    // Send the Output to the log area
    Pvl statsPvl = camStats.toPvl();
    Pvl statsPvl = camStats.toPvl();
    for (int i = 0; i < statsPvl.groups(); i++) {
    for (int i = 0; i < statsPvl.groups(); i++) {
      log->addLogGroup(statsPvl.group(i));
      Application::AppendAndLog(statsPvl.group(i), log);
    }
    }


    if(ui.WasEntered("TO")) {
    if(ui.WasEntered("TO")) {
Loading