summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-09-14 21:12:29 +0000
committerFate <fate-tmw@googlemail.com>2009-09-14 21:12:29 +0000
commite02e6e25938e55b9b8c02bbc4e373ce0ec1a54d9 (patch)
treeabe91ed29c11ca6f72296d63f85f8dc1806e2bd3 /src/map/map.h
parentaf28784c5cba267c49bbda8a7bc796249865be2d (diff)
downloadtmwa-e02e6e25938e55b9b8c02bbc4e373ce0ec1a54d9.tar.gz
tmwa-e02e6e25938e55b9b8c02bbc4e373ce0ec1a54d9.tar.bz2
tmwa-e02e6e25938e55b9b8c02bbc4e373ce0ec1a54d9.tar.xz
tmwa-e02e6e25938e55b9b8c02bbc4e373ce0ec1a54d9.zip
Replace logging mechanism: write out text file every ~20 minutes and try to gzip. If gzip fails, the old file still survives.
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/map/map.h b/src/map/map.h
index 28729c6..5e77d89 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -689,14 +689,8 @@ int map_quit(struct map_session_data *);
int map_addnpc(int,struct npc_data *);
extern FILE *map_logfile;
-#define MAP_LOG(format, args...) \
- if (map_logfile) { \
- struct timeval tv; \
- gettimeofday(&tv, NULL); \
- fprintf(map_logfile, "%ld.%06ld ", (long)tv.tv_sec, (long) tv.tv_usec); \
- fprintf(map_logfile, format, ##args); \
- fputc('\n', map_logfile); \
- }
+void map_write_log(char *format, ...);
+#define MAP_LOG(format, args...) {if (map_logfile) map_write_log(format, ##args);}
// 床アイテム関連
int map_clearflooritem_timer(int,unsigned int,int,int);