Strong encrypted logging for .NET (4.0 - C #)?

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

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

- reliable (logging everything that was sent to the log, even the most recent exception before the failure, log4net does not guarantee this)
-fast (not blocking the caller → asynchronous)
- thread - safe (can be called from several streams at the same time and written to one file)

- encrypts the log files (or allows you to fully configure logging - records only what it receives, has no additional information)

-is free

Ok, this is my list of requirements. Do you know any fees that fit? I read about log4net, but it seems old (uses .NET 2.0 and basically reinvents the wheel), nlog sounds promising as it is asynchronous, but again I think it cannot encrypt. Also I do not know if they are completely safe for everyone.

Should I just write my own registrar? I was thinking of creating a log, a list (or queue) of logs and using a lock added to the list of corresponding logs, the logging thread will convert (possibly a string or some parts to a string) log objects, encrypt them and save them to a file as soon as possible .

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

+3
source share
2 answers

NLog - , Log4Net. , -. . .
, .

, NLog , , ( ). , ​​ (RSA ).

. ,

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

Microsoft Enterprise Library 5.0. MSMQ, . .

, , .

  • "", . , , .
  • .

en lib , PIA, .

+3

All Articles