DoLog 1.2.0

dotnet add package DoLog --version 1.2.0
NuGet\Install-Package DoLog -Version 1.2.0
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="DoLog" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DoLog --version 1.2.0
#r "nuget: DoLog, 1.2.0"
#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 DoLog as a Cake Addin
#addin nuget:?package=DoLog&version=1.2.0

// Install DoLog as a Cake Tool
#tool nuget:?package=DoLog&version=1.2.0

DoLog is a logging application which helps you to log in a CSV file by just plugged in. Install it through Nuget package and your logging functionality is ready.

Steps to Add DoLog:

1. Run the command from Nuget package manager console.

2. Add the namespace

using DoLogLibrary; // put it in namespace section

3. For windows applications, you don't need to set the log file location path. For web application write the below code in App_Start method in Global.ascx.

DoLog.SetLogLocation(Server.MapPath("~")); // Set the location of log file for web application

4. For Logging use method Log under DoLog class. This is a static method, so you don't need to create any kind of object.

Examples:

DoLog.Log("Application Starts");

DoLog.Log(ex.Message,"Error");

DoLog.Log("Application Ends", "Info");

"Log" takes two parameters. first one is the message and second one is the level of message(like info, warning, error or anything user puts).

Method returns a tuple<bool, string>

first items state whether logging operation is successful or not, and second item states the location of log file.

In our new version you can also log data in Database. A database table named TBL_DOLOG will be created and all the log data will be stored over there.
To access this feature use method LogDB() and SetConnectionString().

Example:

// Set the connection string first
DoLog.SetConnectionString(@"Data Source=localhost;Integrated Security=True;Initial Catalog=TestDB;");

// Do the logging operation (return true or false)
DoLog.LogDB("This is a test data.");

DoLog.LogDB(ex.Message,"Error");

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 2,705 12/9/2016
1.1.0 2,269 12/6/2016
1.0.0 6,255 11/29/2016

Released version 1.2.0 where use can log in both file system and database table.