[Include] The Gogger - Advanced log system [BETA]
#9

Quote:
Originally Posted by Shadow_
Посмотреть сообщение
This is pretty simple stuff, but its good i guess.

You could make it better by using a more efficient storing method ( maybe SQL? )

Also within the 'WriteInLog' callback you have used printf but have not put any string/integer ect. so just use print lol.

Its far from unique or advanced. ^^ just saying.
1. No other includes like this exist (None that I know of)
2. It's not meant to be very advanced. People still prefer .txt files for logs instead of MySQL (+ If you're so professional, You can convert this code in a minute to MySQL yourself)
3. Okay, I didn't know the difference between printf and print, sorry, my bad
4. Unique or advanced = It is. At average, You require about 6-8 lines of code to write a string in the log.

what i mean is

pawn Код:
new File:log = fopen("Logs/Log.txt", io_append);
new string[120];
new name[24];
GetPlayerName(playerid, name, sizeof(name) );
format(string, sizeof(string), "%s connected to the server", name);
fwrite(log, string);
Can be converted to

pawn Код:
new string[120];
new name[24];
GetPlayerName(playerid, name, sizeof(name) );
format(string, sizeof(string), "%s connected to the server", name);
WriteInLog("Logs/Log.txt", string);

+ You can suggest whatever you want, EXCEPT converting to a more efficient storage system. I'm gonna do that already. If you got BETTER suggestions, please lemme know.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)