Raised This Month: $32 Target: $400
 8% 

Solved Does amxx_logging 3 work?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 09-17-2023 , 13:51   Does amxx_logging 3 work?
Reply With Quote #1

I noticed a bug around amxx_logging setting. When cstrike/addons/amxmodx/logs directory is not writable, amxx does not print error messages to the terminal, even if amxx_logging is set to 3. When amxx_logging is set to 3 and cstrike/logs is writable, amxx still prints nothing to the terminal. Looks like amxx first checks for the directory to be writable and then enables/disables logging regardless of the amxx_logging setting.

Also, I do not understand why amxx does not write error messages to cstrike/logs when amxx_logging is set to 3 and the user has sufficient permissions to write to cstrike/addons/amxmodx/logs. I tested with the following code:
PHP Code:
server_print("max_entities: %d, %f"global_get(glb_maxEntities)); 
Redundant %f specifier causes amxx to print an error to the terminal:
PHP Code:
L 09/17/2023 20:12:06String formatted incorrectly parameter 3 (total 2)
L 09/17/2023 20:12:06: [AMXXDisplaying debug trace (plugin "test.amxx"version "unknown")
L 09/17/2023 20:12:06: [AMXXRun time error 25parameter error
L 09
/17/2023 20:12:06: [AMXX]    [0test.sma::test (line 22
but nothing to cstrike/logs directory.

Last edited by damage220; 09-19-2023 at 14:27. Reason: Solved
damage220 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-17-2023 , 17:41   Re: Does amxx_logging 3 work?
Reply With Quote #2

It seems that if the if the directory set for "amxx_logs" (default is "addons/amxmodx/logs") is not writable, it will set "amxx_logging" to 0. I would agree that this is a bug and you should see if it's already reported on GitHub and if not create an issue. The workaround would be to set "amxx_logs" to the "logs" instead of "addons/amxmodx/logs" (verify that this works and add that to your bug report on GitHub).
__________________
fysiks is offline
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 09-18-2023 , 12:40   Re: Does amxx_logging 3 work?
Reply With Quote #3

I have created an issue: https://github.com/alliedmodders/amxmodx/issues/1084

"The workaround would be to set "amxx_logs" to the "logs" instead of "addons/amxmodx/logs" (verify that this works and add that to your bug report on GitHub)."
It works but AMXX creates error_* files for errors in cstrike/logs. I thought that amxx_logging 3 should redirect all messages/errors to standard HL log system, i.e. it should write to L${MONTH}-${DAY}-${NUMBER}.log and not create additional files. Am I misunderstood this setting?
damage220 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-19-2023 , 01:32   Re: Does amxx_logging 3 work?
Reply With Quote #4

Quote:
Originally Posted by damage220 View Post
"The workaround would be to set "amxx_logs" to the "logs" instead of "addons/amxmodx/logs" (verify that this works and add that to your bug report on GitHub)."
It works but AMXX creates error_* files for errors in cstrike/logs. I thought that amxx_logging 3 should redirect all messages/errors to standard HL log system, i.e. it should write to L${MONTH}-${DAY}-${NUMBER}.log and not create additional files. Am I misunderstood this setting?
I guess that depends on how the "amxx_logging" setting is defined. It does not appear that there is any attempt to have the error log being set/changed by the "amxx_logging" variable.

I would say it's easy to interpret error logs as something very different from a "log message" since error messages are solely for debugging purposes and are supposed to be rare. So, in my opinion, it's reasonable to think that the "amxx_logging" setting doesn't affect error logs.
__________________
fysiks is offline
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 09-19-2023 , 14:27   Re: Does amxx_logging 3 work?
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
I guess that depends on how the "amxx_logging" setting is defined. It does not appear that there is any attempt to have the error log being set/changed by the "amxx_logging" variable.

I would say it's easy to interpret error logs as something very different from a "log message" since error messages are solely for debugging purposes and are supposed to be rare. So, in my opinion, it's reasonable to think that the "amxx_logging" setting doesn't affect error logs.
Looking at the source code, LogError does not rely on amxx_logging, so yeah it is different mechanism. amxx_logging 3 indeed works. It writes log messages to HL logs (I checked with log_amx function), errors are still written to error_* files in amxx_logs directory which is by design. I am closing this thread as solved.
damage220 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-19-2023 , 22:12   Re: Does amxx_logging 3 work?
Reply With Quote #6

Yes, that is the code I was referencing my posts.
__________________
fysiks is offline
julia98
New Member
Join Date: Aug 2023
Old 09-30-2023 , 14:48   Re: Does amxx_logging 3 work?
Reply With Quote #7

Quote:
Originally Posted by damage220 View Post
I have created an issue: https://github.com/alliedmodders/amxmodx/issues/1084

"The workaround would be to set "amxx_logs" to the "logs" instead of "addons/amxmodx/logs" (verify that this works and add that to your bug report on GitHub)."
It works but AMXX creates error_* files for errors in cstrike/logs. I thought that amxx_logging 3 should redirect all messages/errors to standard HL log system, i.e. it should write to L${MONTH}-${DAY}-${NUMBER}.log and not create additional files. Am I misunderstood this setting?
the "amxx_logging 3" setting isn't behaving as expected, as it's still generating error files in "cstrike/logs" instead of redirecting all messages/errors to the standard HL log system.gb whatsapp It could be necessary to conduct further research or ask the developer for clarification.
julia98 is offline
anniesteubera
New Member
Join Date: Mar 2024
Old 03-26-2024 , 05:20   Re: Does amxx_logging 3 work?
Reply With Quote #8

Quote:
Originally Posted by damage220 View Post
I have created an issue: https://github.com/alliedmodders/amxmodx/issues/1084 Candy Crush

"The workaround would be to set "amxx_logs" to the "logs" instead of "addons/amxmodx/logs" (verify that this works and add that to your bug report on GitHub)."
It works but AMXX creates error_* files for errors in cstrike/logs. I thought that amxx_logging 3 should redirect all messages/errors to standard HL log system, i.e. it should write to L${MONTH}-${DAY}-${NUMBER}.log and not create additional files. Am I misunderstood this setting?
Sory,but nothing to cstrike/logs directory.
anniesteubera is offline
cashes
New Member
Join Date: Apr 2024
Old 04-01-2024 , 10:58   Re: Does amxx_logging 3 work?
Reply With Quote #9

Quote:
Originally Posted by damage220 View Post
I have created an issue: https://github.com/alliedmodders/amxmodx/issues/1084

"The workaround would be to set "amxx_logs" to the "logs" instead of "addons/amxmodx/logs" (verify that this works and add that to your bug report on GitHub)." na7 whatsapp
It works but AMXX creates error_* files for errors in cstrike/logs. I thought that amxx_logging 3 should redirect all messages/errors to standard HL log system, i.e. it should write to L${MONTH}-${DAY}-${NUMBER}.log and not create additional files. Am I misunderstood this setting?
The setting "amxx_logging 3" doesn't seem to function as intended, as it continues to produce error files in "cstrike/logs" instead of channeling all messages/errors to the standard HL log system. Further investigation or reaching out to the developer for clarification may be necessary to address this issue effectively.
cashes is offline
vrendtop
New Member
Join Date: Apr 2024
Old 04-07-2024 , 06:48   Re: Does amxx_logging 3 work?
Reply With Quote #10

I would say it's easy to interpret error logs as something very different from a "log message" since error messages are solely for debugging purposes and are supposed to be rare. So, in my opinion, it's reasonable to think that the "amxx_logging" setting doesn't affect error logs.
vrendtop is offline
Reply



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:18.


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