Open NoahHabanero opened 3 days ago
Hi @NoahHabanero,
can you contact https://gitlab.com/gdziadkiewicz ? It looks like log4net.Ext.Json needs to be adjusted for log4net 3.x
E.g. there are no more matching target frameworks: log4net supports net462 & netstandard2.0 log4net.Ext.Json supports net452, net40, net35, net20, netstandard1.3
ok I have written to him,
What of the log4net.Util.PatternString issue?
Hi, I will take a look today. BTW, congrats on releasing version 3 of log4net
ok I have written to him,
What of the log4net.Util.PatternString issue?
@NoahHabanero I added a unit test for your problem (see https://github.com/apache/logging-log4net/commit/79b57e5eff0fb970a8d51ca35b5bf63e0b90a6df). But I can't reproduce. Maybe you set GlobalContext.Properties too late? It must be called before XmlConfigurator.Configure().
If the problem still persists, please create a separate issue.
Hi all, I reproduced the issue and will be working on getting it fixed.
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Jan Friedrich @.> Sent: Monday, October 14, 2024 5:56:33 PM To: apache/logging-log4net @.> Cc: Grzegorz Dziadkiewicz @.>; Comment @.> Subject: Re: [apache/logging-log4net] Update to 3.0.1 bring new issues (Issue #193)
ok I have written to him,
What of the log4net.Util.PatternString issue?
@NoahHabanerohttps://github.com/NoahHabanero I added a unit test for your problem (see 79b57e5https://github.com/apache/logging-log4net/commit/79b57e5eff0fb970a8d51ca35b5bf63e0b90a6df). But I can't reproduce. Maybe you set GlobalContext.Properties too late? It must be called before XmlConfigurator.Configure().
If the problem still persists, please create a separate issue.
— Reply to this email directly, view it on GitHubhttps://github.com/apache/logging-log4net/issues/193#issuecomment-2411660944, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACBG4D2QK64KN4RDRSEXSLTZ3PSTDAVCNFSM6AAAAABP43DQK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJRGY3DAOJUGQ. You are receiving this because you commented.Message ID: @.***>
It looks like there is a a bad interaction between log4net 3.0.1 and log4net.Ext.Json 2.0.10.1 With error:
Additionally, the issue with log4net.Util.PatternString using global properties to set dynamic log names, For example:
<file type="log4net.Util.PatternString" value="C:\Development\TestProjects\Log4NetExample\Logs\DDLogs\dd-%property{LogName}.json" />
This is still not resolved with updates in 3.0.1, in this case, the log name is dd-null where global property "LogName" is set in the main project like so:
log4net.GlobalContext.Properties["LogName"] = "custom_log_" + DateTime.Now.ToString("yyyyMMdd_HHmmss");
Reference to duplicate issue:
183, but now in version 3.0.1.
Please find a simple project implementation attached. Log4NetExample.zip