-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to 3.0.1 bring new issues #193
Comments
Hi @NoahHabanero, can you contact https://gitlab.com/gdziadkiewicz ? E.g. there are no more matching target frameworks: |
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 |
@NoahHabanero I added a unit test for your problem (see 79b57e5). 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 Android<https://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?
@NoahHabanero<https://github.com/NoahHabanero> I added a unit test for your problem (see 79b57e5<79b57e5>).
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 GitHub<#193 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACBG4D2QK64KN4RDRSEXSLTZ3PSTDAVCNFSM6AAAAABP43DQK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJRGY3DAOJUGQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hi @NoahHabanero , The funny thing I found out while testing if it resolves your problems is that the config in the repro is invalid. Instead of On my side the error with the config change and old log4net.Ext.Json version is:
which corresponds nicely to the code change (adjusting access modifier) I did during the move from 2 to 3. |
Hi @gdziadkiewicz , I have updated to version log4net 3.0.2 As Well as changed from The test project is working as expected! @FreeAndNil thank you for the configuration advice, you are correct, it is working. |
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
The text was updated successfully, but these errors were encountered: