All Projects → ilya-chumakov → LoggingAdvanced

ilya-chumakov / LoggingAdvanced

Licence: Apache-2.0 license
Improved and patched .NET Core console logger.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to LoggingAdvanced

ptkdev-logger
🦒 Beautiful Logger for Node.js: the best alternative to the console.log statement
Stars: ✭ 117 (+485%)
Mutual labels:  console, logger
Gradle Test Logger Plugin
A Gradle plugin for printing beautiful logs on the console while running tests
Stars: ✭ 460 (+2200%)
Mutual labels:  console, logger
hyperapp-logger
Log Hyperapp state updates and action information to the console.
Stars: ✭ 48 (+140%)
Mutual labels:  console, logger
Elmahcore
ELMAH for Net.Standard and Net.Core
Stars: ✭ 127 (+535%)
Mutual labels:  asp-net-core, net-core
Quicklogger
Library for logging on files, console, memory, email, rest, eventlog, syslog, slack, telegram, redis, logstash, elasticsearch, influxdb, graylog, Sentry, Twilio, ide debug messages and throw events for Delphi/Firemonkey/freepascal/.NET (Windows/Linux/OSX/IOS/Android).
Stars: ✭ 137 (+585%)
Mutual labels:  console, logger
Cqrs Clean Eventual Consistency
CQRS, using Clean Architecture, multiple databases and Eventual Consistency
Stars: ✭ 247 (+1135%)
Mutual labels:  asp-net-core, net-core
debug.js
Debugger of JavaScript, by JavaScript, for JavaScript
Stars: ✭ 19 (-5%)
Mutual labels:  console, logger
Fido2 Net Lib
FIDO2 .NET library for FIDO2 / WebAuthn Attestation and Assertion using .NET
Stars: ✭ 417 (+1985%)
Mutual labels:  asp-net-core, net-core
Laravel Console Logger
Logging and Notifications for Laravel Console Commands.
Stars: ✭ 79 (+295%)
Mutual labels:  console, logger
Signale
Highly configurable logging utility
Stars: ✭ 8,575 (+42775%)
Mutual labels:  console, logger
Aspnetcore Realworld Example App
ASP.NET Core backend implementation for RealWorld
Stars: ✭ 1,315 (+6475%)
Mutual labels:  asp-net-core, net-core
capybara-chromedriver-logger
Enables console.log/error/info output from Javascript feature specs running with Chromedriver
Stars: ✭ 54 (+170%)
Mutual labels:  console, logger
X.pagedlist
Library for easily paging through any IEnumerable/IQueryable in ASP.NET/ASP.NET Core
Stars: ✭ 625 (+3025%)
Mutual labels:  asp-net-core, net-core
Znetcs.aspnetcore.logging.entityframeworkcore
This is Entity Framework Core logger and logger provider. A small package to allow store logs in any data store using Entity Framework Core.
Stars: ✭ 24 (+20%)
Mutual labels:  logger, asp-net-core
Webapicontrib.core
Community Contributions for ASP.NET Core
Stars: ✭ 426 (+2030%)
Mutual labels:  asp-net-core, net-core
logt
🖥️ A colourful logger for the browser
Stars: ✭ 35 (+75%)
Mutual labels:  console, logger
vscode-csharp-snippets
Extension of C# Snippets for Visual Studio Code
Stars: ✭ 22 (+10%)
Mutual labels:  asp-net-core, net-core
Plato
Plato helps software teams connect & stay engaged with users to gather feedback, provide support & deliver better software.
Stars: ✭ 293 (+1365%)
Mutual labels:  asp-net-core, net-core
Loglevelnext
A modern logging library for Node.js that provides log level mapping to the console
Stars: ✭ 33 (+65%)
Mutual labels:  console, logger
Go Logger
一个简单而强大的 golang 日志工具包,支持同步和异步输出到 命令行,文件, api 接口,文件支持按文件大小,文件行数,日期切分;A simple and powerful golang logging toolkit that supports synchronous and asynchronous output to the console, file, API interfaces, file support by file size, file line number, date sharding.
Stars: ✭ 152 (+660%)
Mutual labels:  console, logger

LoggingAdvanced

NuGet Build status Build status

An advanced .NET Core console logger. I forked Microsoft code, improved and packaged it as a NuGet package. Starting from 0.4.0 version, it supports ASP.NET Core 2+ based apps.

Examples

With Microsoft.Extensions.Logging.Console:

info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:6002/hc      

With LoggingAdvanced:

[2017.06.15 23:46:44] info: WebHost[1]      Request starting HTTP/1.1 GET http://localhost:6002/hc

How to add the logger

.NET Core 2 way:

    var webHostBuilder = new WebHostBuilder()
        .ConfigureLogging((hostingContext, loggingBuilder) =>
        {
            var loggingSection = hostingContext.Configuration.GetSection("Logging");

            loggingBuilder.AddConsoleAdvanced(loggingSection);
        })

.NET Core 1 way:

    public void Configure(IApplicationBuilder app)
    {
        var loggerFactory = app.ApplicationServices.GetService<ILoggerFactory>();
        loggerFactory.AddConsoleAdvanced(cfg.GetSection("Logging"));
    }

How to customize the logger

Parametrize the AddConsoleAdvanced call with settings:

    loggingBuilder.AddConsoleAdvanced(new ConsoleLoggerSettings()
    {
        IncludeLineBreak = false,
        IncludeTimestamp = true,
        IncludeZeroEventId = false,
        IncludeLogNamespace = false
    });

Or keep the settings in appsettings.json and provide the configuration section:

    AddConsoleAdvanced(Configuration.GetSection("Logging"));

An appsettings.json file example:

    {
        "Logging": {
            "IncludeLineBreak": true,
            "IncludeTimestamp": true,
            "IncludeZeroEventId": true,
            "IncludeLogNamespace": true,
            "TimestampPolicy": {
                "TimeZone": "Ulaanbaatar Standard Time",
                "Format": "MM/dd/yyyy HH:mm:ss.fff"
            }
        }
    }

Feel free to suggest new ideas.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].