Raised This Month: $12 Target: $400
 3% 

Reasoning behind log_amx > log_to_file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zynda
Member
Join Date: Jul 2011
Old 07-11-2016 , 19:19   Reasoning behind log_amx > log_to_file
Reply With Quote #1

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.
Zynda is offline
OGQH
Junior Member
Join Date: Jul 2016
Location: Kazakhstan, Aktau
Old 07-11-2016 , 19:44   Re: Reasoning behind log_amx > log_to_file
Reply With Quote #2

Quote:
Originally Posted by Zynda View Post
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.

Last edited by OGQH; 07-11-2016 at 19:47.
OGQH is offline
Send a message via Skype™ to OGQH
Zynda
Member
Join Date: Jul 2011
Old 07-11-2016 , 19:46   Re: Reasoning behind log_amx > log_to_file
Reply With Quote #3

I am aware of what both functions does, I am simply questioning the ruling in this case.

Last edited by Zynda; 07-11-2016 at 19:46.
Zynda is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-11-2016 , 20:11   Re: Reasoning behind log_amx > log_to_file
Reply With Quote #4

I don't really think there's a problem in using log_to_file if you have a good reason for it.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-11-2016 , 21:28   Re: Reasoning behind log_amx > log_to_file
Reply With Quote #5

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().
__________________
fysiks is offline
Zynda
Member
Join Date: Jul 2011
Old 07-12-2016 , 05:07   Re: Reasoning behind log_amx > log_to_file
Reply With Quote #6

Okay, that makes sense to me, thanks for your input.
Zynda is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-12-2016 , 05:38   Re: Reasoning behind log_amx > log_to_file
Reply With Quote #7

Feel free to use log_to_file when you need to.
__________________
HamletEagle is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:52.


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