mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-07 23:10:44 +00:00
Merge pull request #43 from triplef/android-nslog-syslog
Always use syslog for NSLog on Android
This commit is contained in:
commit
efc0c603eb
1 changed files with 2 additions and 0 deletions
|
@ -181,8 +181,10 @@ _NSLog_standard_printf_handler(NSString* message)
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if defined(HAVE_SYSLOG)
|
#if defined(HAVE_SYSLOG)
|
||||||
|
#ifndef __ANDROID__ // always use syslog on Android (no stdout/stderr)
|
||||||
if (GSPrivateDefaultsFlag(GSLogSyslog) == YES
|
if (GSPrivateDefaultsFlag(GSLogSyslog) == YES
|
||||||
|| write(_NSLogDescriptor, buf, len) != (int)len)
|
|| write(_NSLogDescriptor, buf, len) != (int)len)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
null_terminated_buf = malloc(sizeof (char) * (len + 1));
|
null_terminated_buf = malloc(sizeof (char) * (len + 1));
|
||||||
strncpy (null_terminated_buf, buf, len);
|
strncpy (null_terminated_buf, buf, len);
|
||||||
|
|
Loading…
Reference in a new issue