30 |
#include <iostream> |
#include <iostream> |
31 |
#include <string> |
#include <string> |
32 |
#include "vob/Debug.hxx" |
#include "vob/Debug.hxx" |
33 |
|
#include <fstream> |
34 |
#include <cstdlib> |
#include <cstdlib> |
35 |
|
|
36 |
namespace Vob { |
namespace Vob { |
38 |
namespace Debug { |
namespace Debug { |
39 |
|
|
40 |
std::ostream *debugStream() { |
std::ostream *debugStream() { |
41 |
const char *str = std::getEnv("VOBLOG"); |
const char *str = std::getenv("VOBLOG"); |
42 |
static std::ostream *dbgstream = |
static std::ostream *dbgstream = |
43 |
(str ? new ofstream(str) : std::cout); |
(str ? new std::ofstream(str) : &std::cout); |
44 |
if(str) { |
if(str) { |
45 |
dbgstream->rdbuf()->pubsetbuf(0,0); |
dbgstream->rdbuf()->pubsetbuf(0,0); |
46 |
} |
} |