All Projects → serilogj → serilogj

serilogj / serilogj

Licence: Apache-2.0 license
A direct Java port of .NET's Serilog

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to serilogj

seq-forwarder
Local collection and reliable forwarding of log data to Seq
Stars: ✭ 43 (+26.47%)
Mutual labels:  serilog
serilog-sinks-seq
A Serilog sink that writes events to the Seq structured log server
Stars: ✭ 132 (+288.24%)
Mutual labels:  serilog
resharper-structured-logging
An extension for ReSharper and Rider that highlights structured logging templates and contains some useful analyzers
Stars: ✭ 117 (+244.12%)
Mutual labels:  serilog
serilog-sinks-richtextbox
A Serilog sink that writes log events to a WPF RichTextBox control with colors and theme support
Stars: ✭ 48 (+41.18%)
Mutual labels:  serilog
ASPNETcoreAngularJWT
Angular in ASP.NET Core with JWT solution by systemjs
Stars: ✭ 48 (+41.18%)
Mutual labels:  serilog
Kodkod
https://github.com/alirizaadiyahsi/Nucleus Web API layered architecture startup template with ASP.NET Core 2.1, EF Core 2.1 and Vue Client
Stars: ✭ 45 (+32.35%)
Mutual labels:  serilog
Sitko.Core
Sitko.Core is a set of libraries to help build .NET Core applications fast
Stars: ✭ 46 (+35.29%)
Mutual labels:  serilog
serilog-sinks-rabbitmq
Serilog Sink for RabbitMq
Stars: ✭ 49 (+44.12%)
Mutual labels:  serilog
serilog-sinks-slackclient
Slack Sink for Serilog
Stars: ✭ 24 (-29.41%)
Mutual labels:  serilog
serilog-sinks-sentry
A Sentry sink for Serilog
Stars: ✭ 34 (+0%)
Mutual labels:  serilog
serilog-enrichers-clientinfo
Enrich logs with client IP and UserAgent.
Stars: ✭ 42 (+23.53%)
Mutual labels:  serilog
serilog-sinks-xamarin
A Serilog sink that writes events to Xamarin mobile targets
Stars: ✭ 46 (+35.29%)
Mutual labels:  serilog
Serilog.Sinks.MicrosoftTeams.Alternative
Serilog.Sinks.MicrosoftTeams.Alternative is a library to save logging information from Serilog to Microsoft Teams.
Stars: ✭ 21 (-38.24%)
Mutual labels:  serilog
Serilog.Sinks.Postgresql.Alternative
Serilog.Sinks.Postgresql.Alternative is a library to save logging information from https://github.com/serilog/serilog to https://www.postgresql.org/.
Stars: ✭ 29 (-14.71%)
Mutual labels:  serilog
Akka.Logger.Serilog
Akka.NET logging integration for Serilog library
Stars: ✭ 22 (-35.29%)
Mutual labels:  serilog
CleanArchitecture-Template
This is a solution template for Clean Architecture and CQRS implementation with ASP.NET Core.
Stars: ✭ 60 (+76.47%)
Mutual labels:  serilog
serilog-sinks-grafana-loki
A Serilog sink sending log events to Grafana Loki
Stars: ✭ 55 (+61.76%)
Mutual labels:  serilog
honeycomb
本项目用于验证一系列开源项目
Stars: ✭ 13 (-61.76%)
Mutual labels:  serilog
serilog-settings-reloader
Adds feature to completely reload serilog settings. Also contains switchable ILogger implementation.
Stars: ✭ 16 (-52.94%)
Mutual labels:  serilog
Serilog
Simple .NET logging with fully-structured events
Stars: ✭ 5,000 (+14605.88%)
Mutual labels:  serilog

serilogj

serilogj is a structured logger that is an almost 1-on-1 code conversion of Serilog for .NET. Not everything has been converted, but the a lot of functionality is included in this conversion. Using this in combination with Seq will make searching through log files a lot easier.

Usage

Set up the logger using the desired settings, as such:

// import static serilogj.sinks.coloredconsole.ColoredConsoleSinkConfigurator.*;
// import static serilogj.sinks.rollingfile.RollingFileSinkConfigurator.*;
// import static serilogj.sinks.seq.SeqSinkConfigurator.*;

Log.setLogger(new LoggerConfiguration()
	.writeTo(coloredConsole())
	.writeTo(rollingFile("test-{Date}.log"), LogEventLevel.Information)
	.writeTo(seq("http://localhost:5341/"))
	.setMinimumLevel(LogEventLevel.Verbose)
	.createLogger());

After this you can log using the following example code:

User user = new User();
user.userId = 1234;
user.setUserName("blaat");

Log.verbose("Hello {world} {@user}", "wereld", user);
Log.debug("Hello {world} {@user}", "wereld", user);
Log.information("Hello {world} {@user}", "wereld", user);
Log.warning("Hello {world} {@user}", "wereld", user);
Log.error("Hello {world} {@user}", "wereld", user);
Log.fatal("Hello {world} {@user}", "wereld", user);

Known issues

  • Formatting is only partially supported (only for dates)
  • Only a limited amount of sinks have been converted (colored console, rolling file and Seq)
  • See the issues list for up-for-grabs issues
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].