2011-07-15 06:24:02 +08:00
|
|
|
/*********************************************************************
|
|
|
|
* Copyright 2010, UCAR/Unidata
|
|
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
|
|
* $Header$
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
#ifndef NCLOG_H
|
|
|
|
#define NCLOG_H
|
|
|
|
|
2017-04-04 11:39:44 +08:00
|
|
|
#include "ncexternl.h"
|
|
|
|
|
2012-08-09 07:15:18 +08:00
|
|
|
#define NCENVFLAG "NCLOGFILE"
|
2011-07-15 06:24:02 +08:00
|
|
|
|
|
|
|
/* Suggested tag values */
|
|
|
|
#define NCLOGNOTE 0
|
|
|
|
#define NCLOGWARN 1
|
|
|
|
#define NCLOGERR 2
|
|
|
|
#define NCLOGDBG 3
|
|
|
|
|
2017-03-09 08:01:10 +08:00
|
|
|
#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2017-04-04 11:39:44 +08:00
|
|
|
EXTERNL void ncloginit(void);
|
|
|
|
EXTERNL int ncsetlogging(int tf);
|
|
|
|
EXTERNL int nclogopen(const char* file);
|
|
|
|
EXTERNL void nclogclose(void);
|
2011-07-15 06:24:02 +08:00
|
|
|
|
|
|
|
/* The tag value is an arbitrary integer */
|
2017-04-04 11:39:44 +08:00
|
|
|
EXTERNL void nclog(int tag, const char* fmt, ...);
|
|
|
|
EXTERNL void nclogtext(int tag, const char* text);
|
|
|
|
EXTERNL void nclogtextn(int tag, const char* text, size_t count);
|
2011-07-15 06:24:02 +08:00
|
|
|
|
|
|
|
/* Provide printable names for tags */
|
2017-04-04 11:39:44 +08:00
|
|
|
EXTERNL void nclogsettags(char** tagset, char* dfalt);
|
2011-07-15 06:24:02 +08:00
|
|
|
|
2017-03-09 08:01:10 +08:00
|
|
|
#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2011-07-15 06:24:02 +08:00
|
|
|
#endif /*NCLOG_H*/
|