--- a/sc2src/log.cpp
+++ b/sc2src/log.cpp
@@ -14,25 +14,22 @@
* Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "config.h"
#include "log.h"
-#include <errno.h> // for errno
-
-#include <fstream> // for operator<<, basic_ostream, etc
+#include <errno.h>
+#include <fstream>
using namespace std;
-
-Logger::Logger(const std::string& fn)
+Logger::Logger(const std::string& fn)
: m_tocerr(false), m_loglevel(LLDEB)
{
if (!fn.empty() && fn.compare("stderr")) {
- m_stream.open(fn, std::fstream::out | std::ofstream::trunc);
+ m_stream.open(fn.c_str(), std::fstream::out | std::ofstream::trunc);
if (!m_stream.is_open()) {
cerr << "Logger::Logger: log open failed: for [" <<
- fn << "] errno " << errno << endl;
+ fn << "] errno " << errno << endl;
m_tocerr = true;
}
} else {