summaryrefslogtreecommitdiffstats
path: root/source/cLog.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-16 22:28:14 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-16 22:28:14 +0200
commit33ca4d5003059d7d1f4b9e29649693ec0e5be262 (patch)
tree7bfb4ec7c1d3fcc46c341406667033ec051f010c /source/cLog.cpp
parentWindows compilation fix after Android changes (diff)
downloadcuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.gz
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.bz2
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.lz
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.xz
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.tar.zst
cuberite-33ca4d5003059d7d1f4b9e29649693ec0e5be262.zip
Diffstat (limited to 'source/cLog.cpp')
-rw-r--r--source/cLog.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/cLog.cpp b/source/cLog.cpp
index 372616be8..d1874f7e2 100644
--- a/source/cLog.cpp
+++ b/source/cLog.cpp
@@ -26,7 +26,7 @@ cLog::cLog(const AString & a_FileName )
// create logs directory
cMakeDir::MakeDir("logs");
- OpenLog( (std::string("logs/") + a_FileName).c_str() );
+ OpenLog( (FILE_IO_PREFIX + std::string("logs/") + a_FileName).c_str() );
}
@@ -100,10 +100,6 @@ void cLog::ClearLog()
void cLog::Log(const char * a_Format, va_list argList)
{
-#if defined(ANDROID_NDK)
- __android_log_vprint(ANDROID_LOG_ERROR,"MCServer", a_Format, argList);
- return; // This is as far as android goes
-#endif
AString Message;
AppendVPrintf(Message, a_Format, argList);
@@ -132,8 +128,12 @@ void cLog::Log(const char * a_Format, va_list argList)
}
// Print to console:
+#if defined(ANDROID_NDK)
+ __android_log_vprint(ANDROID_LOG_ERROR,"MCServer", a_Format, argList);
+#else
printf("%s", Line.c_str());
-
+#endif
+
#if defined (_WIN32) && defined(_DEBUG)
// In a Windows Debug build, output the log to debug console as well:
OutputDebugString(Line.c_str());