https://github.com/bilalmehrban/aspdotnetcore-structured-logging-serilog
Structured Logging with Serilog
https://github.com/bilalmehrban/aspdotnetcore-structured-logging-serilog
Last synced: 4 months ago
JSON representation
Structured Logging with Serilog
- Host: GitHub
- URL: https://github.com/bilalmehrban/aspdotnetcore-structured-logging-serilog
- Owner: bilalmehrban
- License: apache-2.0
- Created: 2023-05-15T05:31:03.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-16T07:20:58.000Z (over 2 years ago)
- Last Synced: 2025-03-14T23:12:13.724Z (7 months ago)
- Language: C#
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Implementing Structured Logging using SeriLog in ASP.NET Core 7.0 Web API
Serilog is a popular structured logging library for .NET applications. It's easy to set up, feature-rich, and supports a wide variety of "sinks" - outputs where your logs can be sent.
## Serilog Sinks
A sink in Serilog is a destination where your log events are sent. There are sinks for various outputs like the console, files, databases, and even other logging platforms like Seq
For more information about each sink and how to use them, please refer to the official documentation of the relevant nuget package.
## Getting Started
To get started with this ASP.NET Core web API project, you will need the following:
- Visual Studio 2022 or any similar IDE that supports ASP.NET Core development
- ASP.NET Core 7 SDKHere are the steps to follow:
1. Install Visual Studio 2022 or any similar IDE that supports ASP.NET Core development.
2. Install the latest version of the ASP.NET Core 7 SDK from [here](https://dotnet.microsoft.com/download/dotnet/7.0).
3. Clone the project from GitHub or download the ZIP file and extract it to your local machine.
4. Open the project in Visual Studio or your preferred IDE.
5. Build the project by clicking on the "Build" button or by using the keyboard shortcut `Ctrl+Shift+B`.
6. Run the project by clicking on the "Run" button or by using the keyboard shortcut `Ctrl+F5`.
7. Test the API endpoints by sending HTTP requests to the appropriate URLs.That's it! You should now be able to use this ASP.NET Core web API project with Structured Logging using SeriLog. If you encounter any issues or have any questions, please create an issue or [reach out to me](https://www.linkedin.com/in/bilalmehrban/).
## Contributing
If you want to contribute to this project, you can follow these steps:
1. Fork this repository by clicking on the "Fork" button at the top of the page.
2. Clone your forked repository to your local machine.
3. Make the changes you want to make in your local repository.
4. Commit your changes with a descriptive commit message.
5. Push your changes to your forked repository.
6. Create a pull request by clicking on the "New pull request" button on the original repository's page.Your pull request will be reviewed by me, I will provide feedback and guidance on any necessary changes. Once your changes are accepted, they will be merged into the original repository.
Contributions are welcome, regardless of experience level or background. If you encounter any issues or have any questions, please create an issue or [reach out to me](https://www.linkedin.com/in/bilalmehrban/).
## Credits
- [Bilal Mehrban](https://www.linkedin.com/in/bilalmehrban/)
If you would like to learn more about my work or get in touch with me, please visit my LinkedIn profile linked above.
## License
This project is licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). See the [LICENSE](LICENSE) file for details.