Jump to content
  • 0

how i can add command log in my sql


Hossam

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  92
  • Reputation:   2
  • Joined:  09/06/15
  • Last Seen:  

hello guys 
how i can add command log and cashshop log in my sql

please help

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  86
  • Reputation:   21
  • Joined:  10/02/13
  • Last Seen:  

No.

You have to decide: do you want to log your GM commands and cash to a text file or to your SQL database?

If you want to log to a Text File

1. First, disable SQL logs (conf\log_athena.conf, line 40)

// Use MySQL Logs? [SQL Version Only] (Note 1)
sql_logs: no

2. Uncomment the first lines, comment the last ones. (conf\log_athena.conf, line 141)

// Logging files/tables
// Following settings specify where to log to. If 'sql_logs' is
// enabled, SQL tables are assumed, otherwise flat files.

log_gm_db: log/atcommandlog.log
log_branch_db: log/branchlog.log
log_chat_db: log/chatlog.log
log_mvpdrop_db: log/mvplog.log
log_npc_db: log/npclog.log
log_pick_db: log/picklog.log
log_zeny_db: log/zenylog.log
log_cash_db: log/cashlog.log
log_feeding_db: log/feedinglog.log

//log_gm_db: atcommandlog
//log_branch_db: branchlog
//log_chat_db: chatlog
//log_mvpdrop_db: mvplog
//log_npc_db: npclog
//log_pick_db: picklog
//log_zeny_db: zenylog
//log_cash_db: cashlog
//log_feeding_db: feedinglog

If you want to log to a SQL database

1. First, enable SQL logs (conf\log_athena.conf, line 40)

// Use MySQL Logs? [SQL Version Only] (Note 1)
sql_logs: yes

2. Comment the first lines, uncomment the last ones. (conf\log_athena.conf, line 141)

// Logging files/tables
// Following settings specify where to log to. If 'sql_logs' is
// enabled, SQL tables are assumed, otherwise flat files.

// log_gm_db: log/atcommandlog.log
// log_branch_db: log/branchlog.log
// log_chat_db: log/chatlog.log
// log_mvpdrop_db: log/mvplog.log
// log_npc_db: log/npclog.log
// log_pick_db: log/picklog.log
// log_zeny_db: log/zenylog.log
// log_cash_db: log/cashlog.log
// log_feeding_db: log/feedinglog.log

log_gm_db: atcommandlog
log_branch_db: branchlog
log_chat_db: chatlog
log_mvpdrop_db: mvplog
log_npc_db: npclog
log_pick_db: picklog
log_zeny_db: zenylog
log_cash_db: cashlog
log_feeding_db: feedinglog

 

Edited by Tyrfing
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  86
  • Reputation:   21
  • Joined:  10/02/13
  • Last Seen:  

rAthena logs these by default at the atcommandlog and cashlog tables.

You can verify this in conf\log_athena.conf:

// Track Cash Changes
// 0 - don't log
// 1 - log any changes
log_cash: 1

// Log AtCommands & Charcommands (Note 1)
// Only commands issued by player groups ('conf/groups.conf') with
// 'log_commands' setting set to 'true' will be logged.
log_commands: yes

// Logging files/tables
// Following settings specify where to log to. If 'sql_logs' is
// enabled, SQL tables are assumed, otherwise flat files.
log_gm_db: atcommandlog
log_cash_db: cashlog

 

Edited by Tyrfing
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  92
  • Reputation:   2
  • Joined:  09/06/15
  • Last Seen:  

11 minutes ago, Tyrfing said:

rAthena logs these by default at the atcommandlog and cashlog tables.

You can verify this in conf\log_athena.conf:


// Track Cash Changes
// 0 - don't log
// 1 - log any changes
log_cash: 1

// Log AtCommands & Charcommands (Note 1)
// Only commands issued by player groups ('conf/groups.conf') with
// 'log_commands' setting set to 'true' will be logged.
log_commands: yes

// Logging files/tables
// Following settings specify where to log to. If 'sql_logs' is
// enabled, SQL tables are assumed, otherwise flat files.
log_gm_db: atcommandlog
log_cash_db: cashlog

 

like this

photo_2018-05-26_10-25-45.jpg

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  92
  • Reputation:   2
  • Joined:  09/06/15
  • Last Seen:  

13 minutes ago, Tyrfing said:

No.

You have to decide: do you want to log your GM commands and cash to a text file or to your SQL database?

If you want to log to a Text File

1. First, disable SQL logs (conf\log_athena.conf, line 40)


// Use MySQL Logs? [SQL Version Only] (Note 1)
sql_logs: no

2. Uncomment the first lines, comment the last ones. (conf\log_athena.conf, line 141)


// Logging files/tables
// Following settings specify where to log to. If 'sql_logs' is
// enabled, SQL tables are assumed, otherwise flat files.

log_gm_db: log/atcommandlog.log
log_branch_db: log/branchlog.log
log_chat_db: log/chatlog.log
log_mvpdrop_db: log/mvplog.log
log_npc_db: log/npclog.log
log_pick_db: log/picklog.log
log_zeny_db: log/zenylog.log
log_cash_db: log/cashlog.log
log_feeding_db: log/feedinglog.log

//log_gm_db: atcommandlog
//log_branch_db: branchlog
//log_chat_db: chatlog
//log_mvpdrop_db: mvplog
//log_npc_db: npclog
//log_pick_db: picklog
//log_zeny_db: zenylog
//log_cash_db: cashlog
//log_feeding_db: feedinglog

If you want to log to a SQL database

1. First, enable SQL logs (conf\log_athena.conf, line 40)


// Use MySQL Logs? [SQL Version Only] (Note 1)
sql_logs: yes

2. Comment the first lines, uncomment the last ones. (conf\log_athena.conf, line 141)


// Logging files/tables
// Following settings specify where to log to. If 'sql_logs' is
// enabled, SQL tables are assumed, otherwise flat files.

// log_gm_db: log/atcommandlog.log
// log_branch_db: log/branchlog.log
// log_chat_db: log/chatlog.log
// log_mvpdrop_db: log/mvplog.log
// log_npc_db: log/npclog.log
// log_pick_db: log/picklog.log
// log_zeny_db: log/zenylog.log
// log_cash_db: log/cashlog.log
// log_feeding_db: log/feedinglog.log

log_gm_db: atcommandlog
log_branch_db: branchlog
log_chat_db: chatlog
log_mvpdrop_db: mvplog
log_npc_db: npclog
log_pick_db: picklog
log_zeny_db: zenylog
log_cash_db: cashlog
log_feeding_db: feedinglog

 

SQL database
I did everything but did not appear in Sql

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  86
  • Reputation:   21
  • Joined:  10/02/13
  • Last Seen:  

Please verify that your SQL host, username, password and database name are correct in conf\inter_athena.conf.

// MySQL Map Server
map_server_ip: 127.0.0.1
map_server_port: 3306
map_server_id: ragnarok <~ should be set to your MySQL username
map_server_pw: ragnarok <~ should be set to your MySQL password
map_server_db: ragnarok <~ should be set to your MySQL database

// MySQL Log Database
log_db_ip: 127.0.0.1
log_db_port: 3306
log_db_id: ragnarok <~ should be set to your MySQL username
log_db_pw: ragnarok <~ should be set to your MySQL password
log_db_db: ragnarok <~ should be set to your MySQL database

Pay attention that there are two places that you must update.

Edited by Tyrfing
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...