AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [ Solved ] log_amx (https://forums.alliedmods.net/showthread.php?t=77350)

xPaw 09-11-2008 08:25

[ Solved ] log_amx
 
Hi, for example i do in plugin_55.sma this line
PHP Code:

log_amx("[MyTag] Hello! this is test!"

in server this looks like

PHP Code:

L 09/11/2008 14:30:00: [plugin_55.amxx] [MyTagHellothis is test

my question is, just possible to log without [plugin_55.amxx] tag ?

Arkshine 09-11-2008 08:40

Re: log_amx
 
I don't think. It's specific to this native and it's better like that, so you are able to see from what plugin the log comes.

Alka 09-11-2008 08:46

Re: log_amx
 
You can make a custom log, with "L date time:..." without plugin name.

Exolent[jNr] 09-11-2008 11:20

Re: log_amx
 
Code:
log_noname(const log_fmt[], any:...) {   new current_time[32];   format_time("%m/%d/%Y %H:%M:%S", current_time, sizeof(current_time) - 1);     new log[256];   vformat(log, sizeof(log) - 1, log_fmt, 3);     server_print("L %s: %s", current_time, log);     new file_time[sizeof(current_time)];   format_time("%m%d%Y", file_time, sizeof(file_time) - 1);     new filename[128];   get_basedir(filename, sizeof(filename) - 1);   add(filename, sizeof(filename) - 1, "logs");     if( !dir_exists(filename) ) mkdir(filename);     format(filename, sizeof(filename) - 1, "%s/L%s.log", filename, file_time);     new fileh = fopen(filename, "a+");   fprintf(fileh, "L %s: %s^n", current_time, log);   fclose(fileh); }

xPaw 09-11-2008 11:23

Re: log_amx
 
w00t thanks :P


All times are GMT -4. The time now is 03:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.