Skip to content

Added the ability to configure how many items in the filter will be displayed#95

Merged
zarunbal merged 5 commits intoLogExperts:Developmentfrom
Hirogen:Development
Apr 3, 2019
Merged

Added the ability to configure how many items in the filter will be displayed#95
zarunbal merged 5 commits intoLogExperts:Developmentfrom
Hirogen:Development

Conversation

@Hirogen
Copy link
Collaborator

@Hirogen Hirogen commented Mar 5, 2019

updated 3 files

  • with pattern matching
  • usings with streams instead of manuel close
  • removed unnecessary object initialization
  • expression bodies
  • null coalescing
  • string interpolation and verbatim strings

Hirogen added 2 commits March 5, 2019 10:16
* expression properties
* removed unnecessary object initialization
 * added using for Streams (no close necessary)
@Hirogen
Copy link
Collaborator Author

Hirogen commented Mar 5, 2019

made a few optimizations

Hirogen added 3 commits March 5, 2019 10:43
…ult: 20, minium: 10, maximum: 30) and stored (default 20: minimum: 10, maximum: 100).

With this change a scrollbar will be displayed in the filter drop down
@Hirogen
Copy link
Collaborator Author

Hirogen commented Mar 5, 2019

Added the ability to configure how many filter items are

  • listed default: 20, minium: 10, maximum: 30
  • stored default 20: minimum: 10, maximum: 100

With this change a scrollbar will be displayed in the filter drop down

Example: https://imgur.com/a/qAu1hRJ

@Hirogen Hirogen changed the title Development Added the ability to configure how many filter items are displayed Mar 5, 2019
@Hirogen Hirogen changed the title Added the ability to configure how many filter items are displayed Added the ability to configure how many items in the filter will be displayed Mar 5, 2019
@zarunbal zarunbal merged commit 0f68387 into LogExperts:Development Apr 3, 2019
@zarunbal
Copy link
Collaborator

zarunbal commented Apr 3, 2019

Thanks for your changes. Thanks that you keep on contributing! You even translated code comments 👍

Please next time try to keep the changes where needed (or something changed). Its hard to review so many changes. I know there are many parts in there which can be fixed automatically with e.g. Resharper and other tools (Its tempting to let it run free over the code base, I know). These automatic changes creates a really big PR which I have to review and search where are the real changes are.

Another thing is not everything these tools suggest are better! Especially with loggers and string interpolation.
See by this example. The screenshots are from a decompiler

Normal log string code
_logger.Info("No persistence data for {0} found.", FileName);
Decompiled
2019-04-03 22_31_07-Window

String interpolation code
_logger.Info($"No persistence data for {FileName} found.");
Decompiled
2019-04-03 22_30_10-Window

So the string interpolation leads to a string concat every time even if the log level is not active. The Logger checks before the string.format execution if the log level is active.

<My own opinion. I don't want to offend someone or create endless discussions. I just leave this here>
In my opinion not every "code shortener" is better. I try to write code expressive as possible but not at every price to be short as possible. But most of the helper tools suggest to cut the code really short. But this leads to mostly one line codes which are really lengthy and in my opinion harder to read then e.g. a if over multiple lines with braces. A question mark between >100 characters is harder to spot then a multi line if

I know this code base has some places to improve ;)

@Hirogen
Copy link
Collaborator Author

Hirogen commented Apr 4, 2019

Thanks for your changes. Thanks that you keep on contributing! You even translated code comments 👍

Please next time try to keep the changes where needed (or something changed). Its hard to review so many changes. I know there are many parts in there which can be fixed automatically with e.g. Resharper and other tools (Its tempting to let it run free over the code base, I know). These automatic changes creates a really big PR which I have to review and search where are the real changes are.

Another thing is not everything these tools suggest are better! Especially with loggers and string interpolation.
See by this example. The screenshots are from a decompiler

Normal log string code
_logger.Info("No persistence data for {0} found.", FileName);
Decompiled
2019-04-03 22_31_07-Window

String interpolation code
_logger.Info($"No persistence data for {FileName} found.");
Decompiled
2019-04-03 22_30_10-Window

So the string interpolation leads to a string concat every time even if the log level is not active. The Logger checks before the string.format execution if the log level is active.

<My own opinion. I don't want to offend someone or create endless discussions. I just leave this here>
In my opinion not every "code shortener" is better. I try to write code expressive as possible but not at every price to be short as possible. But most of the helper tools suggest to cut the code really short. But this leads to mostly one line codes which are really lengthy and in my opinion harder to read then e.g. a if over multiple lines with braces. A question mark between >100 characters is harder to spot then a multi line if

I know this code base has some places to improve ;)

Ah thanks for the info, I did not know that interpolated strings are concatenated, I will keep that in mind!

For Future Changes, I will split code formatting changes and "real changes", and create more smaller commits, so changes are better traceable.

I will go through the German comments and translate them to English!

I use LogExpert daily its probably the best Log-Tool on windows! 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments