-
Notifications
You must be signed in to change notification settings - Fork 470
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
[Feature] Serilog w/ NLog support {WIP} #61
[Feature] Serilog w/ NLog support {WIP} #61
Conversation
woot 👍 |
.MinimumLevel.Is(LogEventLevel.Debug) | ||
.WriteTo.ColoredConsole() | ||
.WriteTo.NLog() | ||
.CreateLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had a chance to use Serilog yet, however is there a reason we'd want to hardcode Castle Core to using the NLog sink rather than allow the consumer to set their own configuration like the log4net and NLog integration?
So now that this is refactored it no longer requires serilog/serilog#153. I added some tests and cleaned up the code a bit here and there. What do you think? |
<packages> | ||
<package id="Castle.Core" version="3.3.0" targetFramework="net45" /> | ||
<package id="NLog" version="3.1.0.0" targetFramework="net40" requireReinstallation="True" /> | ||
<package id="Serilog" version="1.3.33" targetFramework="net45" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe loosen this up to 1.3, or even 1.x?
Thanks @ruba1987, sorry for so many comments, but I've added a few more to the updated diff. |
Thanks @jonorossi @jonnii for the feedback. I think I have everything updated now. |
@ruba1987 Just a few more comments:
|
@@ -9,9 +9,10 @@ | |||
//------------------------------------------------------------------------------ | |||
|
|||
namespace CastleTests.Properties { | |||
#if !MONO && !SILVERLIGHT | |||
#if !MONO && !SILVERLIGHT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's here, just on a diff line 12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks. Whitespace changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I missed that. I will fix that then too.
@jonorossi Let me see what serilog supports for other versions. If I can't find anything I will figure something out to do that. Do you have any suggestions? And I will remove the .nuget stuff from the .sln file.... that stuff just keeps turning up everywhere... :-( |
If Serilog only supports .NET 4.5, that isn't a big problem. We should be able to remove the compilation targets for the unsupported versions in the csproj, and use the http://builds.castleproject.org/viewType.html?buildTypeId=Core_Pack |
@ruba1987 Before I forget could you please squish all of your commits into a single commit with a descriptive commit message when you are finished. Thanks. |
I will deff rebase and squash it before you merge it. I was just waiting
|
Thanks. I've set up your branch in TeamCity so we can sort out any build issues with the unsupported framework versions. It has a VCS trigger so you don't need any permissions to start a build. http://builds.castleproject.org/project.html?projectId=core_ruba1987_serilog It looks like the Serilog integration project file still has the |
yea, I noticed that. I'm actually a bit confused about that. It looks like the For now, I have added it to the repo to get the builds in TC working right and then once I know how to set that part up right I will change it. |
@jonorossi Ok, the latest version I pushed seems to build fine in all versions. I added Serilog support for 4.0 and 4.5. Let me know if this looks good and I will squash it. |
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the generic Debug and Release targets from the new C# project.
@jonorossi looks like I squared everything away and now it builds just fine via TC for all builds. |
@ruba1987 I feel really bad continuing to write comments on things that need to change, sorry. The |
Ah damn, I completely forgot to remove that. Sorry for the headache, I will
|
@jonorossi Ok, I fixed that issue with the |
@ruba1987 Thanks, looks all good to me. Sorry this turned out to be painful. |
lol, no worries. On Sun, Jul 6, 2014 at 10:03 PM, Jonathon Rossi notifications@github.com
|
@jonorossi any chance you guys can push this to nuget? I would like to use the package |
@kkozmic do you think we should release Castle Core 3.3.1 with this new package? |
Makes sense sent from my phone
|
@ruba1987 I've released 3.3.1 to nuget.org. Let me know how you go. |
@jonorossi perfect! It works great. Thanks. |
Support for using serilog piping to NLog
Depends on: serilog/serilog#153