CmdStop: Removed log

This commit is contained in:
Paul Beckingham 2016-04-06 20:27:32 -04:00
parent 45cbe7d817
commit 086f0e9c03
3 changed files with 3 additions and 6 deletions

View file

@ -35,8 +35,7 @@
int CmdStop ( int CmdStop (
CLI& cli, CLI& cli,
Rules& rules, Rules& rules,
Database& database, Database& database)
Log& log)
{ {
// Load the most recent interval. // Load the most recent interval.
auto latest = database.getLatestInterval (); auto latest = database.getLatestInterval ();
@ -48,7 +47,6 @@ int CmdStop (
// Stop it. // Stop it.
latest.end (Datetime ()); latest.end (Datetime ());
database.modifyInterval (latest); database.modifyInterval (latest);
log.write ("debug", std::string ("Stopped tracking: ") + latest.serialize ());
// User feedback. // User feedback.
if (rules.getBoolean ("verbose")) if (rules.getBoolean ("verbose"))
@ -69,7 +67,6 @@ int CmdStop (
latest.end ({0}); latest.end ({0});
database.addInterval (latest); database.addInterval (latest);
log.write ("debug", std::string ("Started tracking: ") + latest.serialize ());
// User feedback. // User feedback.
if (rules.getBoolean ("verbose")) if (rules.getBoolean ("verbose"))
@ -79,7 +76,6 @@ int CmdStop (
else else
{ {
std::string message = "There is no active time tracking."; std::string message = "There is no active time tracking.";
log.write ("warning", message);
if (rules.getBoolean ("verbose")) if (rules.getBoolean ("verbose"))
std::cout << message << "\n"; std::cout << message << "\n";
} }

View file

@ -33,7 +33,6 @@
#include <Extensions.h> #include <Extensions.h>
#include <Log.h> #include <Log.h>
int CmdStop (CLI&, Rules&, Database&, Log&);
int CmdTags ( Rules&, Database&, Log&); int CmdTags ( Rules&, Database&, Log&);
int CmdTrack (CLI&, Rules&, Database&, Log&); int CmdTrack (CLI&, Rules&, Database&, Log&);
int CmdUndo ( ); int CmdUndo ( );
@ -51,5 +50,6 @@ int CmdHelp (CLI& );
int CmdImport ( ); int CmdImport ( );
int CmdReport (CLI&, Rules&, Database&, Extensions&); int CmdReport (CLI&, Rules&, Database&, Extensions&);
int CmdStart (CLI&, Rules&, Database& ); int CmdStart (CLI&, Rules&, Database& );
int CmdStop (CLI&, Rules&, Database& );
#endif #endif

View file

@ -218,6 +218,7 @@ int dispatchCommand (
else if (command == "import") status = CmdImport ( ); else if (command == "import") status = CmdImport ( );
else if (command == "report") status = CmdReport (cli, rules, database, extensions); else if (command == "report") status = CmdReport (cli, rules, database, extensions);
else if (command == "start") status = CmdStart (cli, rules, database ); else if (command == "start") status = CmdStart (cli, rules, database );
else if (command == "stop") status = CmdStop (cli, rules, database );
} }
else else
{ {