Server Log
#1

Hi,
Using OnPlayerCommandPerformed, and OnPlayerText, I insert the command, and sender into a database. Basically, every command is logged. The record is dumped after 30 days. I just want to know, will this cause problems with lag? I'm not having any issues with it, but i'd like some input. I'm doing it this way so admins can search up logs by time via admin control panel.
Reply
#2

It shouldn't but it would depend on your host. My server currently logs everything and we don't experience lag.
Reply
#3

Well, not so much lag in the samp server as much as the mysql server. The only things running on this node is samp, lamp and teamspeak, and it's plenty powerful.

I'm worried that sending like 1-2 queries a second might cause issues.
Reply
#4

I had a server which took logs for every command and text in chat. It didn't have any lags so I guess that will not be a problem for you.
Just test your saving/loading functions because I had some problems with it(SQLite was slow with synchronous set to on) and don't make timers with short interval.
Reply
#5

This is how I personally log for my server. All the important commands (admin commands, namechanges, selling/buying things, advertisements, etc.) are logged on the mysql server, while the rest is just saved normally in server_log.txt. Every 3-4 days we rename the log to the date (so for example today we would rename it to "server_log_dec16_2014.txt" and we move it to the "logs" directory which is located in the home directory (linux). Then we just reload the logs. You can easily search through logs (or any file on linux) using

Код:
fgrep "Whatever you want to search for" server_log.txt
This is the simplest and most secure way to do it in my opinion because you don't need to give anyone access to your mysql server and you can easily set up group and user permissions on linux.
Reply
#6

Quote:
Originally Posted by Divergent
Посмотреть сообщение
This is how I personally log for my server. All the important commands (admin commands, namechanges, selling/buying things, advertisements, etc.) are logged on the mysql server, while the rest is just saved normally in server_log.txt. Every 3-4 days we rename the log to the date (so for example today we would rename it to "server_log_dec16_2014.txt" and we move it to the "logs" directory which is located in the home directory (linux). Then we just reload the logs. You can easily search through logs (or any file on linux) using

Код:
fgrep "Whatever you want to search for" server_log.txt
This is the simplest and most secure way to do it in my opinion because you don't need to give anyone access to your mysql server and you can easily set up group and user permissions on linux.
I wouldn't give access to a mysql server, nor would I on linux.

I have a system to search and display logs, it takes a matter of seconds.

But it seems that this won't be an issue, thanks guys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)