Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addLogGroup Depricated #5511

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from
14 changes: 6 additions & 8 deletions isis/src/base/apps/automos/automos.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#include "automos.h"
#include "ProcessMapMosaic.h"

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

using namespace std;

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

if(olistFlag) {
Expand Down
5 changes: 2 additions & 3 deletions isis/src/base/apps/cam2map/cam2map.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "cam2map.h"

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

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

// Cleanup
delete outmap;
Expand Down
3 changes: 2 additions & 1 deletion isis/src/base/apps/campt/campt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <string>
#include <iomanip>

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

// we still want to output the results
log->addLogGroup((*point));
Application::AppendAndLog((*point), log);
delete point;
point = NULL;
}
Expand Down
17 changes: 9 additions & 8 deletions isis/src/base/apps/camrange/camrange.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#include "UserInterface.h"
#include "Application.h"
#include "Camera.h"
#include "Target.h"
#include "Distance.h"
#include "Process.h"
#include "Pvl.h"
#include "UserInterface.h"

#include "camrange.h"

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

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

// Write the log->file if requested
if(ui.WasEntered("TO")) {
Expand Down
4 changes: 3 additions & 1 deletion isis/src/base/apps/camstats/camstats.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#include "camstats.h"

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

if(ui.WasEntered("TO")) {
Expand Down
5 changes: 2 additions & 3 deletions isis/src/base/apps/ckwriter/ckwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "ckwriter.h"

#include "Application.h"
#include "Cube.h"
#include "FileList.h"
#include "Process.h"
Expand Down Expand Up @@ -50,9 +51,7 @@ namespace Isis {
PvlGroup overlap = overrors.group(i);
overlap.setName("Overlaps");
overlap.addKeyword(PvlKeyword("Class", "WARNING"), PvlContainer::Replace);
if (log) {
log->addLogGroup(overlap);
}
Application::AppendAndLog(overlap, log);
}
}

Expand Down
5 changes: 2 additions & 3 deletions isis/src/base/apps/cubeit/cubeit.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "cubeit.h"

#include "Application.h"
#include "ProcessByLine.h"
#include "ProcessMosaic.h"
#include "IException.h"
Expand Down Expand Up @@ -115,9 +116,7 @@ namespace Isis {
}
//Only write out results group if we added something to it.
if (results.hasKeyword("UnpropagatedBand")) {
if (log){
log->addLogGroup(results);
}
Application::Log(results);
}
}
catch(IException &e) {
Expand Down
9 changes: 3 additions & 6 deletions isis/src/base/apps/demprep/demprep.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <iomanip>

#include "Application.h"
#include "Distance.h"
#include "ProcessByLine.h"
#include "TProjection.h"
Expand Down Expand Up @@ -67,9 +68,7 @@ namespace Isis{
PvlGroup demRange("Results");
demRange += PvlKeyword("MinimumRadius", toString(inCubeStats.Minimum()), "meters");
demRange += PvlKeyword("MaximumRadius", toString(inCubeStats.Maximum()), "meters");
if (log){
log->addLogGroup(demRange);
}
Application::Log(demRange);

// Store min/max radii values in new ShapeModelStatistics table
QString shp_name = "ShapeModelStatistics";
Expand Down Expand Up @@ -267,9 +266,7 @@ namespace Isis{
PvlGroup demRange("Results");
demRange += PvlKeyword("MinimumRadius", toString(outCubeStats.Minimum()), "meters");
demRange += PvlKeyword("MaximumRadius", toString(outCubeStats.Maximum()), "meters");
if (log){
log->addLogGroup(demRange);
}
Application::Log(demRange);

// Store min/max radii values in new ShapeModelStatistics table
QString shp_name = "ShapeModelStatistics";
Expand Down
3 changes: 2 additions & 1 deletion isis/src/base/apps/enlarge/enlarge_app.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "enlarge_app.h"

#include "Application.h"
#include "CubeAttribute.h"
#include "Enlarge.h"
#include "IException.h"
Expand Down Expand Up @@ -94,7 +95,7 @@ namespace Isis{
delete interp;

// Write the results to the log
log->addLogGroup(resultsGrp);
Application::AppendAndLog(resultsGrp, log);
}
}

4 changes: 3 additions & 1 deletion isis/src/base/apps/fillgap/fillgap.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <QString>

#include "Application.h"
#include "ProcessBySample.h"
#include "ProcessByLine.h"
#include "ProcessBySpectra.h"
Expand Down Expand Up @@ -77,7 +79,7 @@ namespace Isis {
PvlGroup mLog("Messages");
mLog += PvlKeyword("Warning",
"Unable to fill " + toString(numSpecPixKept) + " special pixels.");
log->addLogGroup(mLog);
Application::AppendAndLog(mLog, log);
}
return;
}
Expand Down
4 changes: 1 addition & 3 deletions isis/src/base/apps/findimageoverlaps/findimageoverlaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ namespace Isis {
PvlGroup results("Results");
results += PvlKeyword("ErrorCount", toString((BigInt)overlaps.Errors().size()));

if (log) {
log->addLogGroup(results);
}
Application::Log(results);
}
}
2 changes: 1 addition & 1 deletion isis/src/base/apps/footprintinit/footprintinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ namespace Isis {
PvlGroup results("Results");
results.addKeyword(PvlKeyword("SINC", toString(sinc)));
results.addKeyword(PvlKeyword("LINC", toString(linc)));
log->addLogGroup(results);
Application::AppendAndLog(results, log);
}

Process p;
Expand Down
4 changes: 2 additions & 2 deletions isis/src/base/apps/getsn/getsn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <sstream>
#include <QString>

#include "Application.h"
#include "Blob.h"
#include "Cube.h"
#include "History.h"
Expand Down Expand Up @@ -88,9 +89,8 @@ namespace Isis {
cout << sn[i][0] << endl;
}
}

if (ui.IsInteractive()) {
log->addLogGroup(sn);
Application::AppendAndLog(sn, log);
}
else {
log->addGroup(sn);
Expand Down
9 changes: 3 additions & 6 deletions isis/src/base/apps/isis2pds/isis2pds.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <QString>

#include "Application.h"
#include "Cube.h"
#include "ExportDescription.h"
#include "FileName.h"
Expand Down Expand Up @@ -119,9 +120,7 @@ namespace Isis{
results += PvlKeyword("HRS", toString(p.OutputHrs()));
results += PvlKeyword("ValidMin", toString(min));
results += PvlKeyword("ValidMax", toString(max));
if (log){
log->addLogGroup(results);
}
Application::Log(results);
}
else {
// Setup the process and set the input cube
Expand Down Expand Up @@ -195,9 +194,7 @@ namespace Isis{
results += PvlKeyword("HRS", toString(process.OutputHrs()));
results += PvlKeyword("ValidMin", toString(min));
results += PvlKeyword("ValidMax", toString(max));
if (log){
log->addLogGroup(results);
}
Application::Log(results);

process.StandardPds4Label();
process.WritePds4(outFileName);
Expand Down
9 changes: 5 additions & 4 deletions isis/src/base/apps/isisexport/isisexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QFile>

#include "cubeatt.h"
#include "Application.h"
#include "CubeAttribute.h"
#include "FileName.h"
#include "md5wrapper.h"
Expand Down Expand Up @@ -54,7 +55,7 @@ namespace Isis {
cubeatt(icube, outputCubePath, outputAttributes);

json dataSource;
Environment env;
inja::Environment env;

Pvl &cubeLabel = *icube->label();

Expand Down Expand Up @@ -127,7 +128,7 @@ namespace Isis {
+ "Previous value [" + QString::fromStdString(dataSource["ExtraPvl"][element.key()].dump())
+ "] will be overwritten.";
duplicateWarnings += PvlKeyword("Duplicate", message);
log->addLogGroup(duplicateWarnings);
Application::AppendAndLog(duplicateWarnings, log);
}
}
}
Expand All @@ -150,7 +151,7 @@ namespace Isis {
+ "Previous value [" + QString::fromStdString(dataSource["ExtraXml"][element.key()].dump())
+ "] will be overwritten.";
duplicateWarnings += PvlKeyword("Duplicate", message);
log->addLogGroup(duplicateWarnings);
Application::AppendAndLog(duplicateWarnings, log);
}
}
}
Expand All @@ -174,7 +175,7 @@ namespace Isis {
+ "Previous value [" + QString::fromStdString(dataSource["ExtraJson"][element.key()].dump())
+ "] will be overwritten.";
duplicateWarnings += PvlKeyword("Duplicate", message);
log->addLogGroup(duplicateWarnings);
Application::AppendAndLog(duplicateWarnings, log);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion isis/src/base/apps/isisimport/isisimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace Isis {
throw IException(IException::User, msg, _FILEINFO_);
}
}
Environment env;
inja::Environment env;

// Dump the JSON to the debugging file if requested
// This needs to be above all uses of the JSON by the template engine
Expand Down
5 changes: 2 additions & 3 deletions isis/src/base/apps/map2map/map2map.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "Application.h"
#include "ProcessRubberSheet.h"
#include "ProjectionFactory.h"
#include "TProjection.h"
Expand Down Expand Up @@ -369,9 +370,7 @@ namespace Isis {
p.StartProcess(*transform, *interp);
p.EndProcess();

if (log){
log->addLogGroup(cleanOutGrp);
}
Application::Log(cleanOutGrp);

// Cleanup
delete transform;
Expand Down
5 changes: 3 additions & 2 deletions isis/src/base/apps/mapmos/mapmos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <QDebug>

#include "Application.h"
#include "ProcessMapMosaic.h"
#include "PvlGroup.h"

Expand Down Expand Up @@ -100,12 +101,12 @@ namespace Isis {
// Logs the cube if it falls outside of the given mosaic
PvlGroup outsiders("Outside");
outsiders += PvlKeyword("File", sInputFile);
log->addLogGroup(outsiders);
Application::AppendAndLog(outsiders, log);
}
else {
// Logs the input file location in the mosaic
for (int i = 0; i < m.imagePositions().groups(); i++) {
log->addLogGroup(m.imagePositions().group(i));
Application::AppendAndLog(m.imagePositions().group(i), log);
}
}

Expand Down
3 changes: 2 additions & 1 deletion isis/src/base/apps/mappt/mappt.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <QString>
#include <cmath>

#include "Application.h"
#include "Brick.h"
#include "FileName.h"
#include "IException.h"
Expand Down Expand Up @@ -41,7 +42,7 @@ void mappt(Cube *icube, UserInterface &ui, Pvl *log, CubeAttributeInput* inAtt)
if(log) {
for(int i = 0; i < points.size(); i++) {
PvlGroup g = getProjPointInfo(icube, points[i], ui, log);
log->addLogGroup(g);
Application::AppendAndLog(g, log);
}
}

Expand Down
Loading