2012-08-09 07:15:18 +08:00
|
|
|
/*********************************************************************
|
|
|
|
* Copyright 2010, UCAR/Unidata
|
|
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
|
|
* $Header$
|
|
|
|
*********************************************************************/
|
2012-08-01 04:34:13 +08:00
|
|
|
|
|
|
|
#ifndef OCLOG_H
|
|
|
|
#define OCLOG_H
|
|
|
|
|
2012-08-09 07:15:18 +08:00
|
|
|
#define OCENVFLAG "OCLOGFILE"
|
2012-08-01 04:34:13 +08:00
|
|
|
|
2012-08-09 07:15:18 +08:00
|
|
|
/* Suggested tag values */
|
|
|
|
#define OCLOGNOTE 0
|
|
|
|
#define OCLOGWARN 1
|
|
|
|
#define OCLOGERR 2
|
|
|
|
#define OCLOGDBG 3
|
2012-08-01 04:34:13 +08:00
|
|
|
|
2012-08-09 07:15:18 +08:00
|
|
|
extern void ocloginit(void);
|
|
|
|
extern int ocsetlogging(int tf);
|
|
|
|
extern int oclogopen(const char* file);
|
|
|
|
extern void oclogclose(void);
|
|
|
|
|
|
|
|
/* The tag value is an arbitrary integer */
|
|
|
|
extern void oclog(int tag, const char* fmt, ...);
|
|
|
|
extern void oclogtext(int tag, const char* text);
|
|
|
|
extern void oclogtextn(int tag, const char* text, size_t count);
|
|
|
|
|
|
|
|
/* Provide printable names for tags */
|
|
|
|
extern void oclogsettags(char** tagset, char* dfalt);
|
2012-08-01 04:34:13 +08:00
|
|
|
|
|
|
|
#endif /*OCLOG_H*/
|