EggEgg.CSharp-Logger
2.2.3
See the version list below for details.
dotnet add package EggEgg.CSharp-Logger --version 2.2.3
NuGet\Install-Package EggEgg.CSharp-Logger -Version 2.2.3
<PackageReference Include="EggEgg.CSharp-Logger" Version="2.2.3" />
paket add EggEgg.CSharp-Logger --version 2.2.3
#r "nuget: EggEgg.CSharp-Logger, 2.2.3"
// Install EggEgg.CSharp-Logger as a Cake Addin #addin nuget:?package=EggEgg.CSharp-Logger&version=2.2.3 // Install EggEgg.CSharp-Logger as a Cake Tool #tool nuget:?package=EggEgg.CSharp-Logger&version=2.2.3
csharp-logger
A bussy but convenient C# Logger implement.
You can download it on nuget.org by searching EggEgg.CSharp-Logger.
Update
v2.2.3
- Added
logLevelWrite
andlogLevelFail
paramter for theLogTraceListener
.
They will be used for invokingTraceListener.Write
andTraceListener.Fail
as the logLevel param. - Also, added a method
Log.PushLog(string, LogLevel, string?)
to log with any LogLevel at runtime.
v2.2.2
- Have some bugfix about auto compress logs.
- Added
debug_LogWriter_AutoFlush
config paramter. Though it's recommended to set it to true, the default value is false because of compatiable reasons. For now, the unflushed parts of the log will be lost. More optimization will come in further versions.
v2.2.0
- Obsoleted the
is_Debug_LogLevel
config paramter.
UseGlobal_Minimum_LogLevel
andConsole_Minimum_LogLevel
instead. You can now control logging output better by them. - Added
Verbose
andNone
LogLevel.Log.Verb
is avaliable now. - Other bugfix and improvements.
Features
- Common logger implements
Usage: FirstlyLog.Initialize(LoggerConfig)
, thenLog.Info(content, sender)
,Log.Erro(...)
,Log.Warn(...)
,Log.Dbug(...)
. - Color output Support
Just add xml tags in text, like:<color=Red>Output as red color</color>
.
The Color value should be a valid value in ConsoleColor, e.g. "Red", "Green".
Recognized color tags will be removed in the log file. - Parallel input Support
if you wants to read the user's input while outputing logs parallel (e.g. making a command interacting program),ConsoleWrapper
is provided.
You can set the value ofConsoleWrapper.InputPrefix
as a waiting-input prefix, just likemysql>
orubuntu ~$
, and useConsoleWrapper.ReadLineAsync
to read inputs from the user.
_Notice that it will impact the performance when the user's input is very large. It's disabled as default, and you can enable it byLoggerConfig(use_Console_Wrapper: true)
. - Output amount limit
Large infomation outputing can severely impact the performance. You can set the maximum output amount per line byLoggerConfig.Max_Output_Char_Count
.
You can also disable this by setting it to-1
. - Auto compress logs
If there're logs created 1 day ago, they will be compressed into a zip file likelogs.[Date].zip
.
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. |
-
net6.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on EggEgg.CSharp-Logger:
Package | Downloads |
---|---|
EggEgg.Shell
Provide easy and fully-armed command-based shell experience. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
5.0.0 | 732 | 7/16/2024 | |
4.0.2 | 363 | 12/22/2023 | |
4.0.1 | 386 | 11/6/2023 | |
4.0.0 | 366 | 9/23/2023 | |
3.0.0 | 351 | 7/13/2023 | |
2.2.3 | 324 | 6/9/2023 | |
2.2.2 | 213 | 5/31/2023 | |
2.2.1 | 225 | 5/6/2023 | |
2.1.4 | 274 | 4/15/2023 | |
2.1.3 | 236 | 4/15/2023 | |
2.1.2 | 231 | 4/9/2023 | |
2.1.1 | 234 | 4/9/2023 | |
2.1.0 | 246 | 4/8/2023 | |
2.0.1 | 232 | 4/8/2023 | |
2.0.0 | 284 | 4/8/2023 |
Changes in v2.2.3
- Added `logLevelWrite` and `logLevelFail` paramter for the `LogTraceListener`.
They will be used for invoking `TraceListener.Write` and `TraceListener.Fail` as the logLevel param.
- Also, added a method `Log.PushLog(string, LogLevel, string?)` to log with any LogLevel at runtime.