AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Reasoning behind log_amx > log_to_file (https://forums.alliedmods.net/showthread.php?t=285121)

Zynda 07-11-2016 19:19

Reasoning behind log_amx > log_to_file
 
After reviewing this sticky in the new plugins submission forum:
https://forums.alliedmods.net/showthread.php?t=21956

Most of the rules are self-explanatory or just makes sense as they are.
But I got curious about this one:
  • Use log_amx instead of log_to_file

This is such a blatant statement, especially considering that the functions in question are not truly alike. It's not like one is just an older deprecated version right?

What if a plugin wants their own custom log file? What about multiple log files for a complex plugin?
Is this functionality simply forbidden, are you supposed to only use one log file for everything?

I would appreciate if anyone could shed some light on this one for me since I use log_to_file a lot in a project of mine, and i actually got more than one log file to make things more organized.

OGQH 07-11-2016 19:44

Re: Reasoning behind log_amx > log_to_file
 
Quote:

Originally Posted by Zynda (Post 2435939)
After reviewing this sticky in the new plugins submission forum:
https://forums.alliedmods.net/showthread.php?t=21956

Most of the rules are self-explanatory or just makes sense as they are.
But I got curious about this one:
  • Use log_amx instead of log_to_file

This is such a blatant statement, especially considering that the functions in question are not truly alike. It's not like one is just an older deprecated version right?

What if a plugin wants their own custom log file? What about multiple log files for a complex plugin?
Is this functionality simply forbidden, are you supposed to only use one log file for everything?

I would appreciate if anyone could shed some light on this one for me since I use log_to_file a lot in a project of mine, and i actually got more than one log file to make things more organized.

log_amx displays a message in the file of the current session (on the launch date), eg L20160712.

Displays messages according to the type: [Date / Time] plugin and a message from the plugin.

Zynda 07-11-2016 19:46

Re: Reasoning behind log_amx > log_to_file
 
I am aware of what both functions does, I am simply questioning the ruling in this case.

OciXCrom 07-11-2016 20:11

Re: Reasoning behind log_amx > log_to_file
 
I don't really think there's a problem in using log_to_file if you have a good reason for it.

fysiks 07-11-2016 21:28

Re: Reasoning behind log_amx > log_to_file
 
I'd guess it's in the context of writing to the standard AMX Mod X log file (to keep that log file consistent throughout). If you are not trying to log to the default log files then you can use log_to_file().

Zynda 07-12-2016 05:07

Re: Reasoning behind log_amx > log_to_file
 
Okay, that makes sense to me, thanks for your input.

HamletEagle 07-12-2016 05:38

Re: Reasoning behind log_amx > log_to_file
 
Feel free to use log_to_file when you need to.


All times are GMT -4. The time now is 14:24.

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