# Writing Log Entries

Create one LogService for errors and one for ordinary events, each with its own folder. In a catch block, log the exception's type and message with the file or record involved, and tell the user something helpful.

![Cheat sheet: Writing Log Entries](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/2ef3ead0e26649edb000bbd321ab9ecc.webp)

- Category: C#
- Level: Journeyman
- Tags: c-sharp, Logging (c-sharp), Stack Trace (c-sharp)
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/logging-exceptions-in-csharp-writing-log-entries-cheat-sheet
