Use Serilog Configuration reader only in Debug build
This commit is contained in:
@@ -47,7 +47,9 @@ public static class DI
|
|||||||
#if DEBUG || VERBOSE_LOGGING
|
#if DEBUG || VERBOSE_LOGGING
|
||||||
.MinimumLevel.Verbose()
|
.MinimumLevel.Verbose()
|
||||||
#endif
|
#endif
|
||||||
|
#if DEBUG
|
||||||
.ReadFrom.Configuration(serviceProvider.GetRequiredService<IConfiguration>())
|
.ReadFrom.Configuration(serviceProvider.GetRequiredService<IConfiguration>())
|
||||||
|
#endif
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.WriteTo.File(
|
.WriteTo.File(
|
||||||
Path.Combine(Program.AppDataRoot, "logs", "appLog.log"),
|
Path.Combine(Program.AppDataRoot, "logs", "appLog.log"),
|
||||||
|
|||||||
@@ -3,16 +3,13 @@ using FileTime.App.Core;
|
|||||||
using FileTime.App.Core.Configuration;
|
using FileTime.App.Core.Configuration;
|
||||||
using FileTime.ConsoleUI;
|
using FileTime.ConsoleUI;
|
||||||
using FileTime.ConsoleUI.App;
|
using FileTime.ConsoleUI.App;
|
||||||
using FileTime.ConsoleUI.App.Styling;
|
|
||||||
using FileTime.ConsoleUI.InfoProviders;
|
using FileTime.ConsoleUI.InfoProviders;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Debugging;
|
using Serilog.Debugging;
|
||||||
using TerminalUI;
|
using TerminalUI;
|
||||||
using TerminalUI.Color;
|
|
||||||
using TerminalUI.ConsoleDrivers;
|
using TerminalUI.ConsoleDrivers;
|
||||||
using TerminalUI.Styling;
|
|
||||||
using ITheme = FileTime.ConsoleUI.App.Styling.ITheme;
|
using ITheme = FileTime.ConsoleUI.App.Styling.ITheme;
|
||||||
|
|
||||||
Console.OutputEncoding = System.Text.Encoding.UTF8;
|
Console.OutputEncoding = System.Text.Encoding.UTF8;
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||||
<PackageReference Include="MvvmGen" Version="1.2.1" />
|
<PackageReference Include="MvvmGen" Version="1.2.1" />
|
||||||
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
|
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
|
||||||
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.0" />
|
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||||
<PackageReference Include="Syroot.Windows.IO.KnownFolders" Version="1.3.0" />
|
<PackageReference Include="Syroot.Windows.IO.KnownFolders" Version="1.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -90,7 +90,9 @@ public static class Startup
|
|||||||
#if DEBUG || VERBOSE_LOGGING
|
#if DEBUG || VERBOSE_LOGGING
|
||||||
.MinimumLevel.Verbose()
|
.MinimumLevel.Verbose()
|
||||||
#endif
|
#endif
|
||||||
|
#if DEBUG
|
||||||
.ReadFrom.Configuration(serviceProvider.GetRequiredService<IConfiguration>())
|
.ReadFrom.Configuration(serviceProvider.GetRequiredService<IConfiguration>())
|
||||||
|
#endif
|
||||||
.Enrich.FromLogContext()
|
.Enrich.FromLogContext()
|
||||||
.WriteTo.File(
|
.WriteTo.File(
|
||||||
Path.Combine(Program.AppDataRoot, "logs", "appLog.log"),
|
Path.Combine(Program.AppDataRoot, "logs", "appLog.log"),
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public sealed partial class Border<T> : ContentView<Border<T>, T>, IDisplayView
|
|||||||
{
|
{
|
||||||
SetStyleColor(renderContext, foregroundColor, fillColor);
|
SetStyleColor(renderContext, foregroundColor, fillColor);
|
||||||
|
|
||||||
// Use the same array that children use. Also use that area, so we working only inside the border
|
// Use the same array that children use. Also use that area, so we work only inside the border
|
||||||
Array2DHelper.RenderEmpty(
|
Array2DHelper.RenderEmpty(
|
||||||
renderContext.ConsoleDriver,
|
renderContext.ConsoleDriver,
|
||||||
borderChildUpdatedCells,
|
borderChildUpdatedCells,
|
||||||
|
|||||||
Reference in New Issue
Block a user