Skip to content

Serilog example and different usage of serilog for different type of .Net Projects

License

Notifications You must be signed in to change notification settings

chinmay-trivedi/SeriLogExamples

Repository files navigation

SeriLogExamples

SeriLog Examples with different type of projects like .Net8 Console App, Web APIs (including minimal api), with NetFrameWork Standard

This project is an example of how to use SeriLog in .Net7 Console App.

  • How to separate the logs based on either log level or properties.
  • How to read appsettings.json config file for SeriLog
  • How to use different type of sinks
  • How to use log template with different sinks

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Visual Studio 2022 or later
  • .NET 8.0 or later
  • Serilog.Extensions.Logging
  • Serilog.Expressions
  • Serilog.Settings.Configuration
  • Serilog.Enrichers.Context
  • Serilog.Enrichers.Environment
  • Serilog.Enrichers.Process
  • Serilog.Enrichers.Thread
  • Serilog.Sinks.File
  • Serilog.Sinks.MSSqlServer
  • Serilog.Sinks.Seq
  • Serilog.Sinks.EventLog
  • Serilog.Sinks.Email
  • Serilog.Sinks.EmailPickup

Installing

  1. Clone the repository.
  2. Open the solution in Visual Studio.
  3. Build the solution.
  4. Run the application.

Built With

  • Visual Studio 2022
  • .NET 8.0
  • Console App Project template
  • SeriLog.Extensions.Logging

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • Kudos to SeriLog team

About

Serilog example and different usage of serilog for different type of .Net Projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages