- Instrumented version for shadow file testing.
This commit is contained in:
@@ -37,7 +37,6 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
@@ -34,10 +34,15 @@
|
|||||||
<h2 class="title">Task Shadow Files</h2>
|
<h2 class="title">Task Shadow Files</h2>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
@@ -679,10 +679,12 @@ void updateRecurrenceMask (
|
|||||||
// Using gTdb and gConf, generate a report.
|
// Using gTdb and gConf, generate a report.
|
||||||
void onChangeCallback ()
|
void onChangeCallback ()
|
||||||
{
|
{
|
||||||
|
std::cout << "--- callback" << std::endl;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (gConf && gTdb)
|
if (gConf && gTdb)
|
||||||
{
|
{
|
||||||
|
std::cout << "--- valid globals" << std::endl;
|
||||||
gConf->set ("curses", "off");
|
gConf->set ("curses", "off");
|
||||||
gConf->set ("color", "off");
|
gConf->set ("color", "off");
|
||||||
|
|
||||||
@@ -690,6 +692,7 @@ void onChangeCallback ()
|
|||||||
std::string shadowFile = expandPath (gConf->get ("shadow.file"));
|
std::string shadowFile = expandPath (gConf->get ("shadow.file"));
|
||||||
if (shadowFile != "")
|
if (shadowFile != "")
|
||||||
{
|
{
|
||||||
|
std::cout << "--- shadowFile " << shadowFile<< std::endl;
|
||||||
// Capture std::cout for the shadow file.
|
// Capture std::cout for the shadow file.
|
||||||
std::ofstream shadow (shadowFile.c_str ());
|
std::ofstream shadow (shadowFile.c_str ());
|
||||||
std::streambuf* original = std::cout.rdbuf (shadow.rdbuf ());
|
std::streambuf* original = std::cout.rdbuf (shadow.rdbuf ());
|
||||||
@@ -704,6 +707,8 @@ void onChangeCallback ()
|
|||||||
|
|
||||||
// Restore std::cout.
|
// Restore std::cout.
|
||||||
std::cout.rdbuf (original);
|
std::cout.rdbuf (original);
|
||||||
|
shadow.close ();
|
||||||
|
std::cout << "--- Complete " << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::string ("Could not write to '") + shadowFile + "'.";
|
throw std::string ("Could not write to '") + shadowFile + "'.";
|
||||||
|
|||||||
Reference in New Issue
Block a user