2007-08-23 Esteban Sanchez <estebans@artica.es>
* pandora_windows_service.cc: Reduced output log level in normal use. * main.cc: Added a new line on help output. * bin/PandoraAgent.exe: Updated to last commit. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@613 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9ddb5101be
commit
9e098ffe42
|
@ -1,3 +1,11 @@
|
||||||
|
2007-08-23 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
|
* pandora_windows_service.cc: Reduced output log level in normal use.
|
||||||
|
|
||||||
|
* main.cc: Added a new line on help output.
|
||||||
|
|
||||||
|
* bin/PandoraAgent.exe: Updated to last commit.
|
||||||
|
|
||||||
2007-08-16 Esteban Sanchez <estebans@artica.es>
|
2007-08-16 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
* ftp/pandora_ftp_test.[cc,h]: Added to repository. Implements a FTP
|
* ftp/pandora_ftp_test.[cc,h]: Added to repository. Implements a FTP
|
||||||
|
|
Binary file not shown.
|
@ -110,7 +110,7 @@ main (int argc, char *argv[]) {
|
||||||
cout << "] [" << SERVICE_UNINSTALL_CMDLINE_PARAM;
|
cout << "] [" << SERVICE_UNINSTALL_CMDLINE_PARAM;
|
||||||
cout << "] [" << SSH_TEST_CMDLINE_PARAM;
|
cout << "] [" << SSH_TEST_CMDLINE_PARAM;
|
||||||
cout << "] [" << FTP_TEST_CMDLINE_PARAM;
|
cout << "] [" << FTP_TEST_CMDLINE_PARAM;
|
||||||
cout << endl;
|
cout << endl << endl;
|
||||||
cout << "Run " << argv[0] << "with " << HELP_CMDLINE_PARAM;
|
cout << "Run " << argv[0] << "with " << HELP_CMDLINE_PARAM;
|
||||||
cout << " parameter for more info." << endl;
|
cout << " parameter for more info." << endl;
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ Pandora_Windows_Service::~Pandora_Windows_Service () {
|
||||||
if (this->modules != NULL) {
|
if (this->modules != NULL) {
|
||||||
delete this->modules;
|
delete this->modules;
|
||||||
}
|
}
|
||||||
|
pandoraLog ("Pandora agent stopped");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -98,6 +99,7 @@ Pandora_Windows_Service::pandora_init () {
|
||||||
|
|
||||||
setPandoraDebug (true);
|
setPandoraDebug (true);
|
||||||
|
|
||||||
|
pandoraLog ("Pandora agent started");
|
||||||
conf_file = Pandora::getPandoraInstallDir ();
|
conf_file = Pandora::getPandoraInstallDir ();
|
||||||
conf_file += "pandora_agent.conf";
|
conf_file += "pandora_agent.conf";
|
||||||
|
|
||||||
|
@ -112,8 +114,8 @@ Pandora_Windows_Service::pandora_init () {
|
||||||
|
|
||||||
if (interval != "") {
|
if (interval != "") {
|
||||||
try {
|
try {
|
||||||
interval_ms = strtoint (interval)
|
/* miliseconds */
|
||||||
* 1000 /* miliseconds */;
|
interval_ms = strtoint (interval) * 1000;
|
||||||
} catch (Invalid_Conversion e) {
|
} catch (Invalid_Conversion e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +123,7 @@ Pandora_Windows_Service::pandora_init () {
|
||||||
srand ((unsigned) time (0));
|
srand ((unsigned) time (0));
|
||||||
this->setSleepTime (interval_ms);
|
this->setSleepTime (interval_ms);
|
||||||
|
|
||||||
pandoraDebug ("Init end");
|
pandoraLog ("Pandora agent started");
|
||||||
}
|
}
|
||||||
|
|
||||||
TiXmlElement *
|
TiXmlElement *
|
||||||
|
@ -278,7 +280,7 @@ Pandora_Windows_Service::copyDataFile (string filename)
|
||||||
"in configuration file.");
|
"in configuration file.");
|
||||||
}
|
}
|
||||||
|
|
||||||
pandoraLog ("Successfuly copied XML file to server.");
|
pandoraDebug ("Successfuly copied XML file to server.");
|
||||||
} catch (Pandora_Exception e) {
|
} catch (Pandora_Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,7 +293,7 @@ Pandora_Windows_Service::pandora_run () {
|
||||||
string tmp_filename, tmp_filepath, interval;
|
string tmp_filename, tmp_filepath, interval;
|
||||||
bool saved;
|
bool saved;
|
||||||
|
|
||||||
pandoraLog ("Run begin");
|
pandoraDebug ("Run begin");
|
||||||
|
|
||||||
agent = getXmlHeader ();
|
agent = getXmlHeader ();
|
||||||
|
|
||||||
|
@ -357,7 +359,7 @@ Pandora_Windows_Service::pandora_run () {
|
||||||
|
|
||||||
/* Get the interval value (in minutes) */
|
/* Get the interval value (in minutes) */
|
||||||
interval = conf->getValue ("interval");
|
interval = conf->getValue ("interval");
|
||||||
pandoraLog ("Next execution on %s mins", interval.c_str ());
|
pandoraLog ("Next execution on %s seconds", interval.c_str ());
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue