Skip to content

A very simplistic .NET (dotnet) Core Logger that outputs colorful text to the console and displays the time at which the text was logged.

License

Notifications You must be signed in to change notification settings

narcitymedia/NarcityLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NarcityLogger

A very simplistic .NET (dotnet) Core Logger that outputs colorful text to the console and displays the time at which the text was logged.

How to use

First, add a reference to the Nuget package. If you're using the dotnet CLI you can do so by running :

dotnet add package NarcityLogger --version 1.0.1

Otherwise, follow the instructions given on the Nuget package page that corresponds to your favorite package manager.

Now, to use the Logger in your source code, you only have to use the NarcityMedia.Log namespace and you're good to go. The following code:

using System;
using NarcityMedia.Log;

namespace LoggerTest
{
    class Program
    {
        static void Main(string[] args)
        {
            NMLogger.Log("Normal");
            NMLogger.Log("Success", LogType.Success);
            NMLogger.Log("Info", LogType.Info);
            NMLogger.Log("Warning", LogType.Warning);
            NMLogger.Log("Error", LogType.Error);
        }
    }
}

Will produce the following output

On Windows

Windows output example

On Unix Systems

Unix output example

About

A very simplistic .NET (dotnet) Core Logger that outputs colorful text to the console and displays the time at which the text was logged.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages