LogLibrary 1.0.1
dotnet add package LogLibrary --version 1.0.1
NuGet\Install-Package LogLibrary -Version 1.0.1
<PackageReference Include="LogLibrary" Version="1.0.1" />
paket add LogLibrary --version 1.0.1
#r "nuget: LogLibrary, 1.0.1"
// Install LogLibrary as a Cake Addin #addin nuget:?package=LogLibrary&version=1.0.1 // Install LogLibrary as a Cake Tool #tool nuget:?package=LogLibrary&version=1.0.1
Cách sử dụng namespace: LogLibrary
Khởi tạo folder để ghi log
LogWriter.Init(string logFolderPath) Trong đó: - logFolderPath: Log Path
Ghi log data
LogWriter.WriteLogData(object request, object result, params LogType[] type) Trong đó: - request: yêu cầu truyền vào - reponse: kết quả trả về - LogType: gồm 2 đối số là Data hoặc Debug: cách sử dụng LogType.Data hoặc LogType.Debug
Ghi log exception
LogWriter.WriteException(Exception ex) Trong đó: ex là exception khi dùng try...catch bắt được Ví dụ: try { } catch (Exception ex) { LogWriter.WriteException(ex); }
Ghi Log Message
LogWriter.WriteLogMsg(string message) LogWriter.WriteLogMsg(string message, LogType type) Ví dụ: LogWriter.WriteLogMsg("hello world");
Ta có thể thêm LogType để ghi theo file tương ứng (mặc định là file Log)
Phiên bản còn rất nhiều mà nay lười quá chưa cập nhật lên được :v :v
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
-
.NETCoreApp 3.0
- CommonLibrary (>= 1.0.0)
- ConfigLibrary (>= 1.0.1)
- ExtensionLibrary (>= 1.0.0)
- Newtonsoft.Json (>= 12.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LogLibrary:
Package | Downloads |
---|---|
ConnectCassandraLibrary
GetSession(string node, int port, string database) -> Lấy session kết nối CloseConnection() -> close session |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 3,818 | 12/4/2019 |