Ignore:
Timestamp:
Nov 3, 2011, 7:44:01 PM (13 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
41a467
Parents:
50e4e5
git-author:
Frederik Heber <heber@…> (10/27/11 11:53:58)
git-committer:
Frederik Heber <heber@…> (11/03/11 19:44:01)
Message:

HUGE: Removed all calls to Log(), eLog(), replaced by LOG() and ELOG().

  • Replaced DoLog(.) && (Log() << Verbose(.) << ... << std::endl) by Log(., ...).
  • Replaced Log() << Verbose(.) << .. << by Log(., ...)
  • on multiline used stringstream to generate and message which was finally used in LOG(., output.str())
  • there should be no more occurence of Log(). LOG() and ELOG() must be used instead.
  • Eventually, this will allow for storing all errors and re-printing them on program exit which would be very helpful to ascertain error-free runs for the user.
Location:
src/Actions/CommandAction
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/CommandAction/BondLengthTableAction.cpp

    r50e4e5 r47d041  
    4747  getParametersfromValueStorage();
    4848
    49   DoLog(0) && (Log() << Verbose(0) << "Using " << params.BondGraphFileName << " as bond length table." << endl);
     49  LOG(0, "Using " << params.BondGraphFileName << " as bond length table.");
    5050  BondGraph *&BG = World::getInstance().getBondGraph();
    5151
     
    6565    std::ifstream input(params.BondGraphFileName.string().c_str());
    6666    if ((input.good()) && (BG->LoadBondLengthTable(input))) {
    67       DoLog(0) && (Log() << Verbose(0) << "Bond length table parsed successfully." << endl);
     67      LOG(0, "Bond length table parsed successfully.");
    6868      input.close();
    6969      return Action::state_ptr(UndoState);
    7070    } else {
    71       DoeLog(1) && (eLog()<< Verbose(1) << "Bond length table parsing failed." << endl);
     71      ELOG(1, "Bond length table parsing failed.");
    7272      input.close();
    7373    }
    7474  } else {
    75     DoeLog(1) && (eLog()<< Verbose(1) << "Bond length table loading failed." << endl);
     75    ELOG(1, "Bond length table loading failed.");
    7676  }
    7777  // recover bond graph
     
    102102  std::ifstream input(state->params.BondGraphFileName.string().c_str());
    103103  if ((input.good()) && (BG->LoadBondLengthTable(input))) {
    104     DoLog(0) && (Log() << Verbose(0) << "Bond length table parsed successfully." << endl);
     104    LOG(0, "Bond length table parsed successfully.");
    105105    input.close();
    106106  }
  • src/Actions/CommandAction/ElementDbAction.cpp

    r50e4e5 r47d041  
    6767  periode->CleanupPeriodtable();
    6868  if (periode->LoadPeriodentafel(configuration->databasepath)) {
    69     DoLog(0) && (Log() << Verbose(0) << "Element list loaded successfully." << endl);
     69    LOG(0, "Element list loaded successfully.");
    7070    //periode->Output();
    7171    return Action::state_ptr(UndoState);
    7272  } else {
    73     DoLog(0) && (Log() << Verbose(0) << "Element list loading failed." << endl);
     73    LOG(0, "Element list loading failed.");
    7474    delete UndoState;
    7575    return Action::failure;
     
    104104  periode->CleanupPeriodtable();
    105105  if (periode->LoadPeriodentafel(configuration->databasepath)) {
    106     DoLog(0) && (Log() << Verbose(0) << "Element list loaded successfully." << endl);
     106    LOG(0, "Element list loaded successfully.");
    107107    //periode->Output();
    108108    return Action::state_ptr(_state);
    109109  } else {
    110     DoLog(0) && (Log() << Verbose(0) << "Element list loading failed." << endl);
     110    LOG(0, "Element list loading failed.");
    111111    return Action::failure;
    112112  }
  • src/Actions/CommandAction/FastParsingAction.cpp

    r50e4e5 r47d041  
    4545  configuration->FastParsing = params.fastparsing;
    4646  if (configuration->FastParsing)
    47     DoLog(0) && (Log() << Verbose(0) << "I won't parse trajectories." << endl);
     47    LOG(0, "I won't parse trajectories.");
    4848  else
    49     DoLog(0) && (Log() << Verbose(0) << "I will parse trajectories." << endl);
     49    LOG(0, "I will parse trajectories.");
    5050  return Action::state_ptr(new CommandFastParsingState(oldvalue, params));
    5151}
     
    5757  configuration->FastParsing = state->oldvalue;
    5858  if (configuration->FastParsing)
    59     DoLog(0) && (Log() << Verbose(0) << "I won't parse trajectories." << endl);
     59    LOG(0, "I won't parse trajectories.");
    6060  else
    61     DoLog(0) && (Log() << Verbose(0) << "I will parse trajectories." << endl);
     61    LOG(0, "I will parse trajectories.");
    6262
    6363  return Action::state_ptr(_state);
     
    7070  configuration->FastParsing = state->params.fastparsing;
    7171  if (configuration->FastParsing)
    72     DoLog(0) && (Log() << Verbose(0) << "I won't parse trajectories." << endl);
     72    LOG(0, "I won't parse trajectories.");
    7373  else
    74     DoLog(0) && (Log() << Verbose(0) << "I will parse trajectories." << endl);
     74    LOG(0, "I will parse trajectories.");
    7575
    7676  return Action::state_ptr(_state);
  • src/Actions/CommandAction/VerboseAction.cpp

    r50e4e5 r47d041  
    4646    // set new verbosity
    4747    setVerbosity(params.verbosity);
    48     DoLog(0) && (Log() << Verbose(0) << "Setting verbosity from " << oldverbosity << " to " << params.verbosity << "." << endl);
     48    LOG(0, "Setting verbosity from " << oldverbosity << " to " << params.verbosity << ".");
    4949    return Action::state_ptr(UndoState);
    5050  } else {
    51     DoLog(0) && (Log() << Verbose(0) << "Verbosity remains unchanged at " << oldverbosity << "." << endl);
     51    LOG(0, "Verbosity remains unchanged at " << oldverbosity << ".");
    5252    return Action::success;
    5353  }
     
    5757  CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get());
    5858
    59   DoLog(0) && (Log() << Verbose(0) << "Setting verbosity from " << state->params.verbosity << " to " << state->oldverbosity << "." << endl);
     59  LOG(0, "Setting verbosity from " << state->params.verbosity << " to " << state->oldverbosity << ".");
    6060  setVerbosity(state->oldverbosity);
    6161
     
    6666  CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get());
    6767
    68   DoLog(0) && (Log() << Verbose(0) << "Setting verbosity from " << state->oldverbosity << " to " << state->params.verbosity << "." << endl);
     68  LOG(0, "Setting verbosity from " << state->oldverbosity << " to " << state->params.verbosity << ".");
    6969  setVerbosity(state->params.verbosity);
    7070
Note: See TracChangeset for help on using the changeset viewer.