diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c6acb25c..3613664bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [vNext] +## [6.2.1] / 2022-08-19 +- Fixed logging configuration + ## [6.2.0] / 2022-08-19 - Added support for intercepted targets - Added target interception for Docker @@ -968,7 +971,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added CLT tasks for Git - Fixed background color in console output -[vNext]: https://github.com/nuke-build/nuke/compare/6.2.0...HEAD +[vNext]: https://github.com/nuke-build/nuke/compare/6.2.1...HEAD +[6.2.1]: https://github.com/nuke-build/nuke/compare/6.2.0...6.2.1 [6.2.0]: https://github.com/nuke-build/nuke/compare/6.1.2...6.2.0 [6.1.2]: https://github.com/nuke-build/nuke/compare/6.1.1...6.1.2 [6.1.1]: https://github.com/nuke-build/nuke/compare/6.1.0...6.1.1 @@ -1060,4 +1064,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. [0.3.1]: https://github.com/nuke-build/nuke/compare/0.2.10...0.3.1 [0.2.10]: https://github.com/nuke-build/nuke/compare/0.2.0...0.2.10 [0.2.0]: https://github.com/nuke-build/nuke/tree/0.2.0 - diff --git a/source/Nuke.Common/Execution/Logging.cs b/source/Nuke.Common/Execution/Logging.cs index 2285f5999..ab8ce4e8c 100644 --- a/source/Nuke.Common/Execution/Logging.cs +++ b/source/Nuke.Common/Execution/Logging.cs @@ -58,16 +58,18 @@ public static LogLevel Level public static void Configure(NukeBuild build = null) { - if (NukeBuild.IsInterceptorExecution) + if (build != null) { - Log.Logger = new LoggerConfiguration() - .WriteTo.Console(new CompactJsonFormatter()) - .CreateLogger(); - return; - } + if (NukeBuild.IsInterceptorExecution) + { + Log.Logger = new LoggerConfiguration() + .WriteTo.Console(new CompactJsonFormatter()) + .CreateLogger(); + return; + } - if (build != null) DeleteOldLogFiles(); + } Log.Logger = new LoggerConfiguration() .Enrich.With()