summaryrefslogtreecommitdiff
path: root/src/map/log.h
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-05-06 22:31:29 -0300
committerJesusaves <cpntb1@ymail.com>2022-05-06 22:31:29 -0300
commite0d1737a0bb383ce7d8d5354e057e0cd35ccadcb (patch)
treeabf9a06b74823318e38a48fb28fcdf0d287a1300 /src/map/log.h
parent6afb6e89b1a27d0bd76c0a03b7791b0265dbd632 (diff)
downloadhercules-e0d1737a0bb383ce7d8d5354e057e0cd35ccadcb.tar.gz
hercules-e0d1737a0bb383ce7d8d5354e057e0cd35ccadcb.tar.bz2
hercules-e0d1737a0bb383ce7d8d5354e057e0cd35ccadcb.tar.xz
hercules-e0d1737a0bb383ce7d8d5354e057e0cd35ccadcb.zip
[TMW2] If PYTHON_LOGS is defined, send some logs to a python script (logmaster.py)
If the script cannot be loaded, it fallbacks to standard SQL logging.
Diffstat (limited to 'src/map/log.h')
-rw-r--r--src/map/log.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/log.h b/src/map/log.h
index 116d99bfd..b12afbdb5 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -31,6 +31,9 @@ struct item;
struct item_data;
struct map_session_data;
struct mob_data;
+#ifdef PYTHON_LOGS
+#include <stdio.h>
+#endif
/**
* Defines
@@ -130,6 +133,10 @@ struct log_interface {
char db_pw[100];
char db_name[32];
struct Sql *mysql_handle;
+ #ifdef PYTHON_LOGS
+ FILE * pystream;
+ int (*pylog) (char* sql_statement);
+ #endif
/* */
void (*pick_pc) (struct map_session_data* sd, e_log_pick_type type, int amount, struct item* itm, struct item_data *data);
void (*pick_mob) (struct mob_data* md, e_log_pick_type type, int amount, struct item* itm, struct item_data *data);