-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Logger overloads generated by T4 #602
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
Conversation
Sync back
No PERL script anymore
Moved 6 loglevel overloads to T4 template. T4 is default included in VS2012+
Note: did this change to easily implement #431 in the near future. |
Probably the T4 is too fancy to handle. Issue 1 (issue #604)The "sync projects" corrupts the before <Compile Include="Logger1.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Logger.tt</DependentUpon>
</Compile> after <Compile Include="Logger1.cs" /> Issue 2 (issue #605)The unit test Those 2 issues has to be solved. |
``` <Customize FileSet="logger.tt" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Logger.tt</DependentUpon> </Customize> ``` for Logger1.cs
PR is ready for merge |
Logger overloads generated by T4
When can we expect a new release with the exception logging fix? |
2 June |
Great improvement in code quality, the logger methods for the six levels (Trace, Debug, Info etc) are now generated with a T4 template. (
.tt
file)This will reduce the lines of code that should be maintained and guarantees the consistency between the overloads. The lines of code in the
Logger
class reduced from ~2000 to ~500 + ~300 (T4 template)T4 templates are run at build time and the T4 generator is built in VIsual Studio 2012+
The output is compared with a text diff and nothing has changed in the signature of the methods (= the same methods, the same parameter names, the same attributes). So nothing functional has changed!
PS: there was only 1 change, beside some spaces, the code of
Error<TArgument>
was inconsistent. This is now fixed. (see screenshot, left=old, right=new)