Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4621896
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:46:00+00:00 2026-05-22T02:46:00+00:00

I’m relatively new to C# so please bear with me. I am looking for

  • 0

I’m relatively new to C# so please bear with me. I am looking for a logging solution for my project (desktop small business application). I know this has been asked a zillion times, but I have some additional requirements and questions.

Is there a logging tool for .NET which is (all of the following):

–reliable (logging everything that was send to logger, even the very last exception before the crash, log4net doesn’t guarantee that)
-fast (not blocking the caller -> asynchronous)
–thread-safe (can be called from multiple threads at the same time and write to one file)

–encrypts log files (or allows totally custom logging – writes only what it gets, no additional information)

-free

Well, that’s my list of requirements. Do you know any tolls which fit? I’ve read about log4net, but it seems old (uses .NET 2.0 and mainly reinvents the wheel), nlog sounds promising as it is asynchronous, yet again I think it can’t encrypt. Also I don’t know if both of them are totally thread safe.

Should I just write my own little logger? I thought about making a logging thread, a list (or queue) of logs, and using locking append to the list appropriate logs, logging thread would convert (probably to string, or some parts to string) log objects, encrypt them and save them to a file as soon as possible.

What do you think I should do?
Thank you for your ideas and answers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:46:02+00:00Added an answer on May 22, 2026 at 2:46 am

    NLog is still maintained, on the contrary of Log4Net. And Yes, it IS thread-safe.
    See my post on that.
    You just have to know how to use it correctly according to your use case scenario.

    As of Encryption, NLog is very expandable and you can write your own log target that encrypts the content before sending it to files (or other). There are lots of Libraries that offer such a utility (RSA Among others).

    You would seamlessly encrypt content in an Encryption Service just before sending it to the log utility per se. Here is a starter code sample, taken from this post

    var provider = new System.Security.Cryptography.RSACryptoServiceProvider();
    provider.ImportParameters(your_rsa_key);
    
    var encryptedBytes = provider.Encrypt(
    System.Text.Encoding.UTF8.GetBytes("Hello World!"), true);
    
    string decryptedTest = System.Text.Encoding.UTF8.GetString(
    provider.Decrypt(encryptedBytes, true));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.