diff --git a/LICENSE.md b/LICENSE.md
index 4bf192a..bb9b067 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -2,6 +2,7 @@ MIT License
Copyright (c) 2016 erizet
Copyright (c) 2019 codeaphex
+Copyright (c) 2023 tanzi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/SerilogViewer.sln b/SerilogViewer.sln
index 3b83f97..1ee7981 100644
--- a/SerilogViewer.sln
+++ b/SerilogViewer.sln
@@ -1,12 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.29411.108
+# Visual Studio Version 17
+VisualStudioVersion = 17.1.32407.343
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SerilogViewerSample", "SerilogViewerSample\SerilogViewerSample.csproj", "{3FFEA19F-765F-426B-B25E-D2A448281878}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SerilogViewer", "SerilogViewer\SerilogViewer.csproj", "{55C840BA-979C-4836-9483-C65D8390EB26}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7C1A6760-7375-4D65-BBFE-B84D0CE90384}"
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
@@ -16,20 +12,24 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.github\workflows\release_nuget_workflow.yaml = .github\workflows\release_nuget_workflow.yaml
EndProjectSection
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerilogViewer", "SerilogViewer\SerilogViewer.csproj", "{3236221A-7A3F-42D9-8333-010D24949DED}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerilogViewerSample", "SerilogViewerSample\SerilogViewerSample.csproj", "{6F87F47C-9F71-4DB1-AFF7-89943190706F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {3FFEA19F-765F-426B-B25E-D2A448281878}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3FFEA19F-765F-426B-B25E-D2A448281878}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3FFEA19F-765F-426B-B25E-D2A448281878}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3FFEA19F-765F-426B-B25E-D2A448281878}.Release|Any CPU.Build.0 = Release|Any CPU
- {55C840BA-979C-4836-9483-C65D8390EB26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {55C840BA-979C-4836-9483-C65D8390EB26}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {55C840BA-979C-4836-9483-C65D8390EB26}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {55C840BA-979C-4836-9483-C65D8390EB26}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3236221A-7A3F-42D9-8333-010D24949DED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3236221A-7A3F-42D9-8333-010D24949DED}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3236221A-7A3F-42D9-8333-010D24949DED}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3236221A-7A3F-42D9-8333-010D24949DED}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6F87F47C-9F71-4DB1-AFF7-89943190706F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6F87F47C-9F71-4DB1-AFF7-89943190706F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6F87F47C-9F71-4DB1-AFF7-89943190706F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6F87F47C-9F71-4DB1-AFF7-89943190706F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SerilogViewer/AssemblyInfo.cs b/SerilogViewer/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/SerilogViewer/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/SerilogViewer/Properties/AssemblyInfo.cs b/SerilogViewer/Properties/AssemblyInfo.cs
deleted file mode 100644
index afd4cea..0000000
--- a/SerilogViewer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("SerilogViewer")]
-[assembly: AssemblyDescription("SerilogViewer is a simple WPF-control to show Serilog-logs.")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("CodeAphex")]
-[assembly: AssemblyProduct("SerilogViewer")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("55c840ba-979c-4836-9483-c65d8390eb26")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.2.2.0")]
-[assembly: AssemblyFileVersion("0.2.2.0")]
diff --git a/SerilogViewer/SerilogViewer.csproj b/SerilogViewer/SerilogViewer.csproj
index f0d442e..a99ad82 100644
--- a/SerilogViewer/SerilogViewer.csproj
+++ b/SerilogViewer/SerilogViewer.csproj
@@ -1,79 +1,29 @@
-
-
-
+
+
- Debug
- AnyCPU
- {55C840BA-979C-4836-9483-C65D8390EB26}
- Library
- Properties
- SerilogViewer
- SerilogViewer
- v4.5
- 512
- true
-
+ net6.0-windows;net7.0-windows;net8.0-windows;net4.6.2-windows
+ enable
+ 10.0
+ true
+ False
+ 1.0.1.2
+ $(AssemblyVersion)
+ SerilogViewer is a simple WPF-control to show Serilog-logs.
+ Serilog;WPF;log
+ Tanzi;erizet;codeaphex
+ LICENSE.md
+ README.md
+ https://github.com/xiaoxstz/SerilogViewer
+ Tanzi.$(AssemblyName)
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
- codeaphex.ico
-
-
-
-
-
- ..\packages\Serilog.2.9.0\lib\net45\Serilog.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SerilogViewer.xaml
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
+
-
-
+
+
+
-
+
-
-
\ No newline at end of file
+
+
diff --git a/SerilogViewer/SerilogViewer.nuspec b/SerilogViewer/SerilogViewer.nuspec
deleted file mode 100644
index 90900cc..0000000
--- a/SerilogViewer/SerilogViewer.nuspec
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- $id$
- $version$
- $title$
- $author$
- $author$
- MIT
- https://github.com/codeaphex/SerilogViewer
- false
- SerilogViewer is a simple WPF-control to show Serilog-logs.
- Reconfigured dependencies
- Copyright 2019
- serilog serilog-sink wpf log control
-
-
-
-
-
\ No newline at end of file
diff --git a/SerilogViewer/SerilogViewer.xaml b/SerilogViewer/SerilogViewer.xaml
index b28a5d9..0efa772 100644
--- a/SerilogViewer/SerilogViewer.xaml
+++ b/SerilogViewer/SerilogViewer.xaml
@@ -32,10 +32,10 @@
-
+
-
+
diff --git a/SerilogViewer/codeaphex.ico b/SerilogViewer/codeaphex.ico
deleted file mode 100644
index 10d8ef4..0000000
Binary files a/SerilogViewer/codeaphex.ico and /dev/null differ
diff --git a/SerilogViewer/packages.config b/SerilogViewer/packages.config
deleted file mode 100644
index 05f70df..0000000
--- a/SerilogViewer/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/SerilogViewerSample/App.config b/SerilogViewerSample/App.config
deleted file mode 100644
index 713d642..0000000
--- a/SerilogViewerSample/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/SerilogViewerSample/App.xaml b/SerilogViewerSample/App.xaml
index 228f767..b01da61 100644
--- a/SerilogViewerSample/App.xaml
+++ b/SerilogViewerSample/App.xaml
@@ -1,6 +1,7 @@
diff --git a/SerilogViewerSample/AssemblyInfo.cs b/SerilogViewerSample/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/SerilogViewerSample/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/SerilogViewerSample/MainWindow.xaml b/SerilogViewerSample/MainWindow.xaml
index 868b38b..3e27948 100644
--- a/SerilogViewerSample/MainWindow.xaml
+++ b/SerilogViewerSample/MainWindow.xaml
@@ -1,16 +1,20 @@
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:serilogviewer ="clr-namespace:SerilogViewer;assembly=SerilogViewer"
+ xmlns:local="clr-namespace:SerilogViewerSample"
+ mc:Ignorable="d"
+ Title="MainWindow" Height="450" Width="800">
-
-
+
+
-
+
@@ -22,20 +26,20 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
-
+
@@ -43,8 +47,7 @@
-
+
-
diff --git a/SerilogViewerSample/MainWindow.xaml.cs b/SerilogViewerSample/MainWindow.xaml.cs
index 2d9cf6f..b5fa2ca 100644
--- a/SerilogViewerSample/MainWindow.xaml.cs
+++ b/SerilogViewerSample/MainWindow.xaml.cs
@@ -9,7 +9,6 @@
namespace SerilogViewerSample
{
-
///
/// Interaction logic for MainWindow.xaml
///
@@ -44,7 +43,7 @@ private void Send_Click(object sender, RoutedEventArgs e)
{
log.ForContext().Write(level, tbLogText.Text);
}
- else
+ else
{
log.Write(level, tbLogText.Text);
}
@@ -60,21 +59,21 @@ private void SendWithContext_Click(object sender, RoutedEventArgs e)
log.ForContext().Write(level, tbLogText.Text);
}
- private void OnLogMessageItemAdded(object o, EventArgs Args )
- {
- // Do what you want :)
- LogEvent logEvent = (SerilogEvent)Args;
- if( logEvent.Level >= LogEventLevel.Error)
- SystemSounds.Beep.Play();
- }
+ private void OnLogMessageItemAdded(object o, EventArgs Args)
+ {
+ // Do what you want :)
+ LogEvent logEvent = (SerilogEvent)Args;
+ if (logEvent.Level >= LogEventLevel.Error)
+ SystemSounds.Beep.Play();
+ }
private void Clear_Click(object sender, RoutedEventArgs e)
{
- logCtrl.Clear();
+ logCtrl.Clear();
}
private void TopScroll_Click(object sender, RoutedEventArgs e)
{
- logCtrl.ScrollToFirst();
+ logCtrl.ScrollToFirst();
}
private void BottomScroll_Click(object sender, RoutedEventArgs e)
{
@@ -121,7 +120,5 @@ private void SendLogs(object obj)
backgroundLogger.Debug("Backgroundtask stopped.");
}
-
-
}
}
diff --git a/SerilogViewerSample/Properties/AssemblyInfo.cs b/SerilogViewerSample/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0952900..0000000
--- a/SerilogViewerSample/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("SerilogViewerSample")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("CodeAphex")]
-[assembly: AssemblyProduct("SerilogViewerSample")]
-[assembly: AssemblyCopyright("Copyright © CodeAphex 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/SerilogViewerSample/Properties/Resources.Designer.cs b/SerilogViewerSample/Properties/Resources.Designer.cs
deleted file mode 100644
index 0aa9600..0000000
--- a/SerilogViewerSample/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace SerilogViewerSample.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SerilogViewerSample.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/SerilogViewerSample/Properties/Resources.resx b/SerilogViewerSample/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/SerilogViewerSample/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/SerilogViewerSample/Properties/Settings.Designer.cs b/SerilogViewerSample/Properties/Settings.Designer.cs
deleted file mode 100644
index eff67c4..0000000
--- a/SerilogViewerSample/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace SerilogViewerSample.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/SerilogViewerSample/Properties/Settings.settings b/SerilogViewerSample/Properties/Settings.settings
deleted file mode 100644
index 033d7a5..0000000
--- a/SerilogViewerSample/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SerilogViewerSample/SerilogViewerSample.csproj b/SerilogViewerSample/SerilogViewerSample.csproj
index dbac8b4..84de25c 100644
--- a/SerilogViewerSample/SerilogViewerSample.csproj
+++ b/SerilogViewerSample/SerilogViewerSample.csproj
@@ -1,125 +1,15 @@
-
-
-
+
+
- Debug
- AnyCPU
- {3FFEA19F-765F-426B-B25E-D2A448281878}
WinExe
- Properties
- SerilogViewerSample
- SerilogViewerSample
- v4.5
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- ..\
- true
-
+ net6.0-windows10.0.22000.0
+ enable
+ true
+ 7.0
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
- codeaphex.ico
-
-
-
- ..\packages\Serilog.2.9.0\lib\net45\Serilog.dll
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
-
+
-
- {55c840ba-979c-4836-9483-c65d8390eb26}
- SerilogViewer
-
+
-
-
-
\ No newline at end of file
+
+
diff --git a/SerilogViewerSample/codeaphex.ico b/SerilogViewerSample/codeaphex.ico
deleted file mode 100644
index 10d8ef4..0000000
Binary files a/SerilogViewerSample/codeaphex.ico and /dev/null differ
diff --git a/SerilogViewerSample/packages.config b/SerilogViewerSample/packages.config
deleted file mode 100644
index 05f70df..0000000
--- a/SerilogViewerSample/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file