// utf-8

/*	Copyright  (c)	Günter Woigk   1999-2002
					mailto:kio@little-bat.de

	This file is free software

 	This program is distributed in the hope that it will be useful,
 	but WITHOUT ANY WARRANTY; without even the implied warranty of
 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  

 	Permission to use, copy, modify, distribute, and sell this software and
 	its documentation for any purpose is hereby granted without fee, provided
 	that the above copyright notice appear in all copies and that both that
 	copyright notice and this permission notice appear in supporting
 	documentation, and that the name of the copyright holder not be used
 	in advertising or publicity pertaining to distribution of the software
 	without specific, written prior permission. The copyright holder makes no
 	representations about the suitability of this software for any purpose.
 	It is provided "as is" without express or implied warranty.

 	THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 	INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 	EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 	CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 	DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 	TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 	PERFORMANCE OF THIS SOFTWARE.
 
	log to stderr

	2002-03-02	kio	replaced old macos classic log file
*/


#ifdef _kio_h_


extern void 		Log 	( cstr formatstring, ... );
extern void 		LogLine	( cstr formatstring, ... );
extern void 		LogIn 	( cstr formatstring, ... );
extern void 		LogOut 	( cstr formatstring, ... );
extern void 		LogOut	( );
extern void 		Log 	( );
extern void 		LogNL 	( );


// conditional logging
#define	XLOG		(LOG>=1)
#define	XXLOG		(LOG>=2)
#define	XXXLOG		(LOG>=3)
#define	XXXXLOG		(LOG>=4)


#define	XLogNL		if ( !XLOG )	{} else LogNL
#define	XXLogNL		if ( !XXLOG )	{} else LogNL
#define	XXXLogNL	if ( !XXXLOG )	{} else LogNL
#define	XXXXLogNL	if ( !XXXXLOG )	{} else LogNL

#define	XLog		if ( !XLOG )	{} else Log
#define	XXLog		if ( !XXLOG )	{} else Log
#define	XXXLog		if ( !XXXLOG )	{} else Log
#define	XXXXLog		if ( !XXXXLOG )	{} else Log

#define	XLogLine	if ( !XLOG )	{} else LogLine
#define	XXLogLine	if ( !XXLOG )	{} else LogLine
#define	XXXLogLine	if ( !XXXLOG )	{} else LogLine
#define	XXXXLogLine	if ( !XXXXLOG )	{} else LogLine

#define	XLogIn		if ( !XLOG )	{} else LogIn
#define	XXLogIn		if ( !XXLOG )	{} else LogIn
#define	XXXLogIn	if ( !XXXLOG )	{} else LogIn
#define	XXXXLogIn	if ( !XXXXLOG )	{} else LogIn

#define	XLogOut		if ( !XLOG )	{} else LogOut
#define	XXLogOut	if ( !XXLOG )	{} else LogOut
#define	XXXLogOut	if ( !XXXLOG )	{} else LogOut
#define	XXXXLogOut	if ( !XXXXLOG )	{} else LogOut


#endif








