You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "FreeAndNil (via GitHub)" <gi...@apache.org> on 2025/07/02 22:03:21 UTC
[PR] #250 mocked DateTimeStrategy to speedup test (logging-log4net)
FreeAndNil opened a new pull request, #262:
URL: https://github.com/apache/logging-log4net/pull/262
- added release notes
- added license headers
- adjusted Log4NetIntegrationTests to .editorconfig
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] #250 mocked DateTimeStrategy to speedup test (logging-log4net)
Posted by "gdziadkiewicz (via GitHub)" <gi...@apache.org>.
gdziadkiewicz commented on PR #262:
URL: https://github.com/apache/logging-log4net/pull/262#issuecomment-3030905939
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] #250 mocked DateTimeStrategy to speedup test (logging-log4net)
Posted by "FreeAndNil (via GitHub)" <gi...@apache.org>.
FreeAndNil commented on PR #262:
URL: https://github.com/apache/logging-log4net/pull/262#issuecomment-3029466330
@gdziadkiewicz I've cleaned up a little bit. Can you take a look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] #250 mocked DateTimeStrategy to speedup test (logging-log4net)
Posted by "fluffynuts (via GitHub)" <gi...@apache.org>.
fluffynuts commented on code in PR #262:
URL: https://github.com/apache/logging-log4net/pull/262#discussion_r2182167909
##########
src/log4net/Appender/RollingFileAppender.cs:
##########
@@ -790,7 +790,7 @@ private void InitializeFromOneFile(string baseFile, string curFileName)
curFileName = curFileName.ToLowerInvariant();
baseFile = baseFile.ToLowerInvariant();
string dir = string.IsNullOrEmpty(baseFile) ? "" : Path.GetDirectoryName(baseFile);
- var baseFileWithoutExtension = Path.Combine(dir ?? "", Path.GetFileNameWithoutExtension(baseFile));
+ string baseFileWithoutExtension = Path.Combine(dir ?? "", Path.GetFileNameWithoutExtension(baseFile));
Review Comment:
is there a new style choice to prefer types over `var`? just curious - I see that you prefer, eg,
```csharp
SomeType thing = new();
```
over
```csharp
var thing = new SomeType();
```
elsewhere - so perhaps this is just a habit :smile: not a big deal - just curious
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] #250 mocked DateTimeStrategy to speedup test (logging-log4net)
Posted by "FreeAndNil (via GitHub)" <gi...@apache.org>.
FreeAndNil commented on code in PR #262:
URL: https://github.com/apache/logging-log4net/pull/262#discussion_r2182205831
##########
src/log4net/Appender/RollingFileAppender.cs:
##########
@@ -790,7 +790,7 @@ private void InitializeFromOneFile(string baseFile, string curFileName)
curFileName = curFileName.ToLowerInvariant();
baseFile = baseFile.ToLowerInvariant();
string dir = string.IsNullOrEmpty(baseFile) ? "" : Path.GetDirectoryName(baseFile);
- var baseFileWithoutExtension = Path.Combine(dir ?? "", Path.GetFileNameWithoutExtension(baseFile));
+ string baseFileWithoutExtension = Path.Combine(dir ?? "", Path.GetFileNameWithoutExtension(baseFile));
Review Comment:
Yes, I prefer `SomeType thing = new();` because you can use the same Pattern for Lists: `List<string> list = [];`
`var list = new List<string>();` is "much" longer ;-)
Even the version for simple objects is now shorter without var. I only use var for complex Linq-Queries or when I don't know what to expect 😄
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] #250 mocked DateTimeStrategy to speedup test (logging-log4net)
Posted by "FreeAndNil (via GitHub)" <gi...@apache.org>.
FreeAndNil merged PR #262:
URL: https://github.com/apache/logging-log4net/pull/262
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org