Edited some logging details.
This commit is contained in:
parent
e09be154bc
commit
28db5700a4
2 changed files with 8 additions and 1 deletions
|
@ -590,6 +590,7 @@ int main(int argc, char ** argv){
|
||||||
if (Request["conversion"].isMember("convert")){
|
if (Request["conversion"].isMember("convert")){
|
||||||
for (JSON::ObjIter it = Request["conversion"]["convert"].ObjBegin(); it != Request["conversion"]["convert"].ObjEnd(); it++){
|
for (JSON::ObjIter it = Request["conversion"]["convert"].ObjBegin(); it != Request["conversion"]["convert"].ObjEnd(); it++){
|
||||||
myConverter.startConversion(it->first,it->second);
|
myConverter.startConversion(it->first,it->second);
|
||||||
|
Controller::Log("CONV","Conversion " + it->second["input"].asString() + " to " + it->second["output"].asString() + " started.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Request["conversion"].isMember("status") || Request["conversion"].isMember("convert")){
|
if (Request["conversion"].isMember("status") || Request["conversion"].isMember("convert")){
|
||||||
|
|
|
@ -31,7 +31,13 @@ namespace Controller {
|
||||||
m.append(message);
|
m.append(message);
|
||||||
Storage["log"].append(m);
|
Storage["log"].append(m);
|
||||||
Storage["log"].shrink(100); //limit to 100 log messages
|
Storage["log"].shrink(100); //limit to 100 log messages
|
||||||
std::cout << "(" << Util::epoch() << ") [" << kind << "] " << message << std::endl;
|
time_t rawtime;
|
||||||
|
struct tm * timeinfo;
|
||||||
|
char buffer [100];
|
||||||
|
time (&rawtime);
|
||||||
|
timeinfo = localtime (&rawtime);
|
||||||
|
strftime (buffer,100,"%b %d %Y -- %H:%M",timeinfo);
|
||||||
|
std::cout << "(" << buffer << ") [" << kind << "] " << message << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
///\brief Write contents to Filename
|
///\brief Write contents to Filename
|
||||||
|
|
Loading…
Add table
Reference in a new issue