summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 10:25:17 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 10:25:17 +0000
commit4280180ca690da7c6734db0d4bb3cea50ae2e980 (patch)
tree0788d8cb465a088a52426be911b9ba07eab17ac2
parent647bf4578d482b8e17b15feb5aea5e1f9614fbba (diff)
downloadhercules-4280180ca690da7c6734db0d4bb3cea50ae2e980.tar.gz
hercules-4280180ca690da7c6734db0d4bb3cea50ae2e980.tar.bz2
hercules-4280180ca690da7c6734db0d4bb3cea50ae2e980.tar.xz
hercules-4280180ca690da7c6734db0d4bb3cea50ae2e980.zip
Fixed TXT logging
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@917 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt1
-rw-r--r--conf-tmpl/log_athena.conf27
-rw-r--r--src/map/log.c24
3 files changed, 32 insertions, 20 deletions
diff --git a/Changelog.txt b/Changelog.txt
index e15d10b41..4f3133ba4 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
01/05
+ * Fixed TXT logging - log_athena.conf reading was kind of messed up [celest]
* Added a simplified version of Qamera's OnConnect: OnDisconnect: OnDeath:
NPC events mod, (All credits go to him.) except adapted based on eA's current
PCLoginEvent. (by davidsiaw) [celest]
diff --git a/conf-tmpl/log_athena.conf b/conf-tmpl/log_athena.conf
index 4a90ca628..35f5eb055 100644
--- a/conf-tmpl/log_athena.conf
+++ b/conf-tmpl/log_athena.conf
@@ -37,6 +37,9 @@ log_zeny: 0
// Log GM Commands (set to minimum level of Logged Commands)
log_gm: 40
+// Log NPC 'logmes' commands
+log_npc: 0
+
// Dead Branch Log Table
log_branch_db: branchlog
@@ -65,32 +68,38 @@ log_vend_db: vendlog
// GM Log Table
log_gm_db: atcommandlog
+// NPC Log Table
+log_npc_db: npclog
+
// Dead Branch Log File
-log_branch: log/branchlog.log
+log_branch_file: log/branchlog.log
// Drop Log File
-log_drop: log/droplog.log
+log_drop_file: log/droplog.log
// MVP Drop File
-log_mvpdrop: log/mvplog.log
+log_mvpdrop_file: log/mvplog.log
// Present Drop File
-log_present: log/presentlog.log
+log_present_file: log/presentlog.log
// Produce Log File
-log_produce: log/producelog.log
+log_produce_file: log/producelog.log
// Refine Log File
-log_refine: log/refinelog.log
+log_refine_file: log/refinelog.log
// Trade Log File
-log_trade: log/tradelog.log
+log_trade_file: log/tradelog.log
// Vend Log File
-log_vend: log/vendlog.log
+log_vend_file: log/vendlog.log
// GM Log File
-log_gm: log/atcommandlog.log
+log_gm_file: log/atcommandlog.log
+
+// NPC Log File
+log_npc_file: log/npclog.log
import: conf/import/log_conf.txt \ No newline at end of file
diff --git a/src/map/log.c b/src/map/log.c
index 67b32af4b..440dc40f8 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -411,12 +411,13 @@ int log_config_read(char *cfgName)
log_config.zeny = 0;
else
log_config.zeny = (atoi(w2));
- } else if(strcmpi(w1,"log_gm") == 0) {
+ } else if(strcmpi(w1,"log_gm") == 0) {
log_config.gm = (atoi(w2));
} else if(strcmpi(w1,"log_npc") == 0) {
log_config.npc = (atoi(w2));
}
+ #ifndef TXT_ONLY
else if(strcmpi(w1, "log_branch_db") == 0) {
strcpy(log_config.log_branch_db, w2);
if(log_config.branch == 1)
@@ -463,32 +464,33 @@ int log_config_read(char *cfgName)
if(log_config.npc > 0)
printf("Logging NPC 'logmes' to table `%s`\n", w2);
}
+ #endif
- else if(strcmpi(w1, "log_branch") == 0) {
+ else if(strcmpi(w1, "log_branch_file") == 0) {
strcpy(log_config.log_branch, w2);
if(log_config.branch > 0 && log_config.sql_logs < 1)
printf("Logging Dead Branch Usage to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_drop") == 0) {
+ } else if(strcmpi(w1, "log_drop_file") == 0) {
strcpy(log_config.log_drop, w2);
if(log_config.drop > 0 && log_config.sql_logs < 1)
printf("Logging Item Drops to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_mvpdrop") == 0) {
+ } else if(strcmpi(w1, "log_mvpdrop_file") == 0) {
strcpy(log_config.log_mvpdrop, w2);
if(log_config.mvpdrop > 0 && log_config.sql_logs < 1)
printf("Logging MVP Drops to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_present") == 0) {
+ } else if(strcmpi(w1, "log_present_file") == 0) {
strcpy(log_config.log_present, w2);
if(log_config.present > 0 && log_config.sql_logs < 1)
printf("Logging Present Usage & Results to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_produce") == 0) {
+ } else if(strcmpi(w1, "log_produce_file") == 0) {
strcpy(log_config.log_produce, w2);
if(log_config.produce > 0 && log_config.sql_logs < 1)
printf("Logging Producing to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_refine") == 0) {
+ } else if(strcmpi(w1, "log_refine_file") == 0) {
strcpy(log_config.log_refine, w2);
if(log_config.refine > 0 && log_config.sql_logs < 1)
printf("Logging Refining to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_trade") == 0) {
+ } else if(strcmpi(w1, "log_trade_file") == 0) {
strcpy(log_config.log_trade, w2);
if(log_config.trade > 0 && log_config.sql_logs < 1)
{
@@ -497,15 +499,15 @@ int log_config_read(char *cfgName)
printf("and Zeny Trades");
printf(" to file `%s`.txt\n", w2);
}
- } else if(strcmpi(w1, "log_vend") == 0) {
+ } else if(strcmpi(w1, "log_vend_file") == 0) {
strcpy(log_config.log_vend, w2);
if(log_config.vend > 0 && log_config.sql_logs < 1)
printf("Logging Vending to file `%s`.txt\n", w2);
- } else if(strcmpi(w1, "log_gm") == 0) {
+ } else if(strcmpi(w1, "log_gm_file") == 0) {
strcpy(log_config.log_gm, w2);
if(log_config.gm > 0 && log_config.sql_logs < 1)
printf("Logging GM Level %d Commands to file `%s`.txt\n", log_config.gm, w2);
- } else if(strcmpi(w1, "log_npc") == 0) {
+ } else if(strcmpi(w1, "log_npc_file") == 0) {
strcpy(log_config.log_npc, w2);
if(log_config.npc > 0 && log_config.sql_logs < 1)
printf("Logging NPC 'logmes' to file `%s`.txt\n", w2);