Easy-Log
1.0.4
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 Easy-Log --version 1.0.4
NuGet\Install-Package Easy-Log -Version 1.0.4
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="Easy-Log" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Easy-Log --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Easy-Log, 1.0.4"
#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.
// Install Easy-Log as a Cake Addin #addin nuget:?package=Easy-Log&version=1.0.4 // Install Easy-Log as a Cake Tool #tool nuget:?package=Easy-Log&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
How to use?
- Install Easy-Log from nuget or run this command in NuGet Package manager
Install-Package Easy-Log -Version 1.0.4
- Add
using EasyLog;
to top Then add
Logger log = new Logger();
Config cfg = new Config();
If you want customize settings add
void SetConfig()
{
cfg.LogPath = Environment.CurrentDirectory + @"\Application.log";//Set path where you want log to be saved
cfg.ShowDate = true;//If this is set to true it will add date to the log
cfg.Console = true;//If this is set to true it will print the log to Console too
}
Then in your application main void add these
log.cfg = cfg;
SetConfig();
log.InitLogger();//Call this to init logger
Sending logs
- Debug Log
log.Debug("Hello from log, this is debug");
- Info Log
log.Info("Hello from log, this is info");
- Warning Log
log.Warning("Hello from log, this is warning");
- Error Log
log.Error("Hello from log, this is error");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
S1.0.4 Update (re-written logger and added colors to console) and changet framework to 4.8