A direct Java port of .NET's Serilog
Switch branches/tags
Nothing to show
Clone or download


serilogj Bintray

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.


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

Log.setLogger(new LoggerConfiguration()
	.writeTo(rollingFile("test-{Date}.log"), LogEventLevel.Information)

After this you can log using the following example code:

User user = new User();
user.userId = 1234;

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);


This source requires the io.advantageous.boon package for reflection.

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