// Copyright 1997 Omni Development, Inc.  All rights reserved.

#import "OBLog.h"
#import <Foundation/Foundation.h>

#import "rcsid.h"

RCS_ID("$Header: /Network/Developer/Source/CVS/OmniGroup/OmniBase/OBLog.m,v 1.2 1997/10/19 08:18:37 luke Exp $")

void OBLog(NSString *format, ...)
{
#if !defined(sun)
    va_list                     argList;
    static NSLock              *logLock = nil;

    if (!logLock)
	logLock = [[NSLock alloc] init];

    va_start(argList, format);
    [logLock lock];
    if (!format)
	[NSException raise:@"EmptyLogMessage" format:@"Called OBLog with no format"];
    NSLogv(format, argList);
    [logLock unlock];
    va_end(argList);
#else
#warning FIXME: OBLog disabled on Solaris
    // Why is this disabled? --kc
    NSLog(@"OBLog() disabled on Solaris");
#endif
}
