https://github.com/dotnet9/codewf.logviewer
https://github.com/dotnet9/codewf.logviewer
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dotnet9/codewf.logviewer
- Owner: dotnet9
- License: mit
- Created: 2024-07-05T06:37:05.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-10T02:35:27.000Z (11 months ago)
- Last Synced: 2025-08-12T00:54:03.389Z (10 months ago)
- Language: C#
- Size: 1010 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CodeWF.LogViewer
简单封装一些日志控件
## CodeWF.LogViewer.Avalonia
AvaloniaUI中使用的SelectableTextBlock做为日志展示控件,NuGet包安装:
```shell
Install-Package CodeWF.LogViewer.Avalonia
```
`.axaml`使用:
```html
xmlns:log="https://codewf.com"
```
```html
```
代码中添加日志
```csharp
Logger.Debug("调试日志");
Logger.Info("普通日志");
Logger.Warn("警告日志");
Logger.Error("错误日志");
Logger.Fatal("严重错误日志");
```

## CodeWF.LogViewer.Avalonia.Log4Net
AvaloniaUI中使用的SelectableTextBlock做为日志展示控件,NuGet包安装:
```shell
Install-Package CodeWF.LogViewer.Avalonia.Log4Net
```
`.axaml`使用:
```html
xmlns:log="https://codewf.com"
```
```html
```
代码中添加日志
```csharp
LogFactory.Instance.Log.Debug("调试日志");
LogFactory.Instance.Log.Info("普通日志");
LogFactory..Instance.Log.Warn("警告日志");
LogFactory.Instance.Log.Error("错误日志");
LogFactory.Instance.Log.Fatal("严重错误日志");
```
