diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/astra/Logging.h | 4 | ||||
| -rw-r--r-- | include/astra/clog.h | 11 | 
2 files changed, 14 insertions, 1 deletions
| diff --git a/include/astra/Logging.h b/include/astra/Logging.h index e822c24..8e19ea4 100644 --- a/include/astra/Logging.h +++ b/include/astra/Logging.h @@ -29,6 +29,8 @@ $Id$  #ifndef _INC_ASTRA_LOGGING  #define _INC_ASTRA_LOGGING +#include "astra/Globals.h" +  #define ASTRA_DEBUG(...) astra::CLogger::debug(__FILE__,__LINE__, __VA_ARGS__)  #define ASTRA_INFO(...) astra::CLogger::info(__FILE__,__LINE__, __VA_ARGS__)  #define ASTRA_WARN(...) astra::CLogger::warn(__FILE__,__LINE__, __VA_ARGS__) @@ -44,7 +46,7 @@ enum log_level {      LOG_ERROR  }; -class CLogger +class _AstraExport CLogger  {  	CLogger();    ~CLogger(); diff --git a/include/astra/clog.h b/include/astra/clog.h index ce082df..c0cbae4 100644 --- a/include/astra/clog.h +++ b/include/astra/clog.h @@ -71,7 +71,15 @@  #include <stdio.h>  #include <string.h>  #include <time.h> +#ifndef _MSC_VER  #include <unistd.h> +#else +#include <io.h> +#define open _open +#define close _close +#define write _write +#define snprintf _snprintf +#endif  /* Number of loggers that can be defined. */  #define CLOG_MAX_LOGGERS 16 @@ -625,7 +633,10 @@ _clog_log(const char *sfile, int sline, enum clog_level level,          if (dynbuf != buf) {              free(dynbuf);          } +#ifndef _MSC_VER +        // FIXME          fsync(logger->fd); +#endif      }  } | 
