AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   Solved Does amxx_logging 3 work? (https://forums.alliedmods.net/showthread.php?t=343951)

damage220 09-17-2023 13:51

Does amxx_logging 3 work?
 
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.

fysiks 09-17-2023 17:41

Re: Does amxx_logging 3 work?
 
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).

damage220 09-18-2023 12:40

Re: Does amxx_logging 3 work?
 
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?

fysiks 09-19-2023 01:32

Re: Does amxx_logging 3 work?
 
Quote:

Originally Posted by damage220 (Post 2810219)
"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.

damage220 09-19-2023 14:27

Re: Does amxx_logging 3 work?
 
Quote:

Originally Posted by fysiks (Post 2810237)
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.

fysiks 09-19-2023 22:12

Re: Does amxx_logging 3 work?
 
Yes, that is the code I was referencing my posts.

julia98 09-30-2023 14:48

Re: Does amxx_logging 3 work?
 
Quote:

Originally Posted by damage220 (Post 2810219)
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.

anniesteubera 03-26-2024 05:20

Re: Does amxx_logging 3 work?
 
Quote:

Originally Posted by damage220 (Post 2810219)
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.

cashes 04-01-2024 10:58

Re: Does amxx_logging 3 work?
 
Quote:

Originally Posted by damage220 (Post 2810219)
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.

vrendtop 04-07-2024 06:48

Re: Does amxx_logging 3 work?
 
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.


All times are GMT -4. The time now is 05:00.

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