FormatLog 1.0.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package FormatLog --version 1.0.2
NuGet\Install-Package FormatLog -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FormatLog" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FormatLog" Version="1.0.2" />
<PackageReference Include="FormatLog" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FormatLog --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FormatLog, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FormatLog@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FormatLog&version=1.0.2
#tool nuget:?package=FormatLog&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FormatLog ��־�������
�������
����������������Ŀ��
- FormatLog�������ܽṹ����־�����֧�ֲ���������ʽȥ�ء����������ġ�����д�롢�α��ҳ��ѯ��
- DemoWPF��WPF ��ʾ��Ŀ��չʾ��־д�롢��ѯ�����ı���Ⱦ�ȹ��ܡ�
FormatLog �������
��Ҫ����
- �ṹ����־��ʽ��ͨ��
FormatΨһԼ������־���ݲ����������ڼ��������� - **��������־**��
Log֧����� 10 ���������Զ��鵵������������ظ��洢�� - ��������������
CallerInfo��¼��Ա���ļ����кţ����ڶ�λ�� - ����������д����
FLog˫�������+��̨�̣߳��Զ�����д�� SQLite�������˳��Զ� Flush�� - ��Ч��ҳ��ѯ��֧���α��ҳ��˫��ҳ������ɸѡ������ʱ�䡢��ʽ�������������ߵȣ���
- �쳣�־û���Flush �쳣�Զ����� JSON/TXT�������Ų顣
����ṹ
FormatLog/Format.cs��־��ʽ���壬Ψһ��Լ������������ SQL��FormatLog/Log.cs��־��ʵ�壬������ʽ�����������������ġ�����ʱ��ȡ�FormatLog/Argument.cs��־����ʵ�壬Ψһ��Լ����FormatLog/CallerInfo.cs����������ʵ�壬Ψһ��Լ����FormatLog/LogDbContext.csEF Core ���ݿ������ģ��Զ�����������ڷֿ⡣FormatLog/FLog.cs��־�ع��������д�롢�쳣�������ҳ��ѯ��- ���������ࣺ
QueryModel��FlushInfo��KeysetPage��
��������
- д����־
FLog.Add(new Log(LogLevel.Info, "�û���¼��{0}@{1}", userName, domain).WithCallerInfo());
- ��ѯ��־����ҳ��ɸѡ��
var query = new QueryModel()
.WithLevel(LogLevel.Info)
.WithFormat("��¼")
.OrderBy(OrderType.OrderByIdDescending)
.WithCursorId(nextCursorId);
var page = await query.KeysetPaginationAsync();
�������
- ��ʽȥ������־��ʽ�����������������ľ��Զ�ȥ�أ���ʡ�洢�ռ䡣
- ������Ч��˫�������+���� SQL ���룬��������д�����ܡ�
- ����չ��֧���Զ���ɸѡ����ҳ���쳣�����
- ���ݿ�ֿ�������ֿ⣬���ڹ鵵��ά����
����
- �߲�����־д�������/�����Ӧ��
- �ṹ����־����������ϵͳ
- ��Ҫ�ٵ��������ġ������ĵ���/��ά����
����
- .NET 8
- Microsoft.EntityFrameworkCore.Sqlite
DemoWPF ��ʾ��Ŀ
��Ҫ����
- ��־д����ʾ��֧�ֶ���������־��ϵͳ��Ϣ���˷�������������ַ�������/���ı���ʱ������û�/����/������Ϣ�ȣ�����д�롣
- ��־��ѯ��ɸѡ��֧�ְ���ʽ�������������ߡ�����ʱ�䷶Χ�ȶ�����ɸѡ��֧���α��ҳ��˫��ҳ��
- ���ı���Ⱦ����־���ݲ���������ʾ��֧�ֶַθ��ı���
- ����ͳ����ʵʱ��ʾ��־д�����ܣ�ÿ����д���ʱ����
��Ҫ����
- ��־д��ҳ��ѡ����־���ͺ͵ȼ�������д����ʾ��
- ��־��ѯҳ��������ɸѡ����ҳ��������ı�������
���з�ʽ
- ��װ .NET 8 SDK��
- ����
DemoWPF��Ŀ��WinExe��WPF���� - ���� MahApps.Metro��UI��������FormatLog����־���ģ���
���� FormatLog ����
- ���� FormatLog ��Ŀ�� NuGet ����
- ʹ��
FLog.Add(new Log(...).WithCallerInfo())д����־�� - ʹ��
QueryModel���з�ҳ��ѯ�� - WPF ����
LogViewModel���и��ı��ֶ���Ⱦ��
Ŀ¼�ṹ
FormatLog/
���� Format.cs
���� Log.cs
���� Argument.cs
���� CallerInfo.cs
���� LogDbContext.cs
���� FLog.cs
DemoWPF/
���� LogViewModel.cs
���� LogTextSegment.cs
���� MainWindow.xaml(.cs)
����
- .NET 8
- Microsoft.EntityFrameworkCore.Sqlite
- MahApps.Metro��DemoWPF UI��
��������
- ��־д���쳣���Զ��־û��� JSON/TXT �ļ��������Ų顣
- ��־���ݿⰴ��ֿ⣬���ڹ鵵��ά����
������ϸ API �ĵ�����ο������飬�����Դ��ע�ͻ���ϵά���ߡ�
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.EntityFrameworkCore.Sqlite (>= 9.0.7)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FormatLog:
| Package | Downloads |
|---|---|
|
EFCoreLayerKit
基于 Entity Framework Core 的通用数据访问层工具包,支持自动仓储注册、DTO 映射、软删除、自动迁移等,适用于 .NET 8+ 项目。 |
GitHub repositories
This package is not used by any popular GitHub repositories.