mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-19 01:51:03 +00:00
sync with NSLog()
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38594 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
442f5e8640
commit
6f0288bcd4
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-05-31 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcLogger.m: When logging to stderr, use lock to synchronise with
|
||||
logs produced by gnustep-base NSLog().
|
||||
|
||||
2015-05-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcAlarmSinkSNMP.m: log SNMP errors via the main logging mechanism
|
||||
|
|
10
EcLogger.m
10
EcLogger.m
|
@ -234,7 +234,17 @@ static NSArray *modes;
|
|||
{
|
||||
buf = [str dataUsingEncoding: NSUTF8StringEncoding];
|
||||
}
|
||||
#if defined(GNUSTEP_BASE_LIBRARY)
|
||||
{
|
||||
NSRecursiveLock *l = GSLogLock();
|
||||
|
||||
[l lock];
|
||||
fwrite([buf bytes], 1, [buf length], stderr);
|
||||
[l unlock];
|
||||
}
|
||||
#else
|
||||
fwrite([buf bytes], 1, [buf length], stderr);
|
||||
#endif
|
||||
if (LT_DEBUG != type)
|
||||
{
|
||||
if (nil == serverName)
|
||||
|
|
Loading…
Reference in a new issue