Server Log - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server Log (
/showthread.php?tid=551069)
Server Log -
TakeiT - 16.12.2014
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.
Re: Server Log -
Divergent - 16.12.2014
It shouldn't but it would depend on your host. My server currently logs everything and we don't experience lag.
Re: Server Log -
TakeiT - 16.12.2014
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.
Re: Server Log -
dominik523 - 16.12.2014
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.
Re: Server Log -
Divergent - 16.12.2014
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.
Re: Server Log -
TakeiT - 16.12.2014
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.