NetModules.Logging.LocalLogging
1.3.8.1
dotnet add package NetModules.Logging.LocalLogging --version 1.3.8.1
NuGet\Install-Package NetModules.Logging.LocalLogging -Version 1.3.8.1
<PackageReference Include="NetModules.Logging.LocalLogging" Version="1.3.8.1" />
<PackageVersion Include="NetModules.Logging.LocalLogging" Version="1.3.8.1" />
<PackageReference Include="NetModules.Logging.LocalLogging" />
paket add NetModules.Logging.LocalLogging --version 1.3.8.1
#r "nuget: NetModules.Logging.LocalLogging, 1.3.8.1"
#:package NetModules.Logging.LocalLogging@1.3.8.1
#addin nuget:?package=NetModules.Logging.LocalLogging&version=1.3.8.1
#tool nuget:?package=NetModules.Logging.LocalLogging&version=1.3.8.1
NetModules.Logging.LocalLogging
NetModules.Logging.LocalLogging is a NetModules module that handles the built in LoggingEvent and outputs to Console 8f available, as well as logging to local files.
Every loaded Module in a loaded ModuleHost can raise a LoggingEvent
either mannually by instantiating and sending it to Host.Handle, or by using the this.Log(severity, arguments) wrapper method.
A Module doesn't need to worry about how logging is handled unless it's a logging Module!
NetModules.Logging.LocalLogging.Events
The NetModules.Logging.LocalLogging module handles and exposes its own events for interacting with console logging and the local log files, these events can be referenced and raised by other modules to read log data.
These events are as follows:
- LastLine: Returns the last
LoggingEvent
record in the event otput. - ReadLogFile: Returns n lines from the local log file in the event output.
- SearchLogFile: Returns n lines from the local log file that match a query in the event output.
- SetLoggingLevel: Allows you to dynamically override the logging level for a selected logger at runtime. This may be useful if you need to read a level urgently.
Getting Started
Installation
To use NetModules.Logging.LocalLogging, add the library to a project where you instantiate a ModuleHost via NuGet Package Manager:
Install-Package NetModules.Logging.LocalLogging
Logging will be automatically enabled when you load the module into your ModuleHost.
To use events from NetModules.Logging.LocalLogging.Events, add the events library as a reference to a Module project via NuGet Package Manager:
Install-Package NetModules.Logging.LocalLogging.Events
You can then instantiate an event and raise it to ModuleHost
via your module's this.Host.Handle
method for a handling module to process.
Contributing
We welcome contributions! To get involved:
- Fork NetModules.Logging.LocalLogging, make improvements, and submit a pull request.
- Code will be reviewed upon submission.
- Join discussions via the issues board.
This project must always strictly adhere to the NetModules architecture and design pattern!
License
NetModules.Logging.LocalLogging is licensed under the MIT License, allowing unrestricted use, modification, and distribution. If you use NetModules.Logging.LocalLogging in your own project, we’d love to hear about your experience, and possibly feature you on our website!
Full documentation coming soon!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. 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. |
-
net6.0
- NetModules (>= 1.3.8)
- NetModules.Logging.LocalLogging.Events (>= 1.3.8)
- NetTools.Logging (>= 1.2.2)
- NetTools.Serialization.Json (>= 1.1.39)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.