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


i'm relatively new c# please bear me. looking logging solution project (desktop small business application). know has been asked zillion times, have additional requirements , questions.

is there logging tool .net (all of following):

-reliable (logging send logger, last exception before crash, log4net doesn't guarantee that)
-fast (not blocking caller -> asynchronous)
-thread-safe (can called multiple threads @ same time , write 1 file)

-encrypts log files (or allows totally custom logging - writes gets, no additional information)

-free

well, that's list of requirements. know tolls fit? i've read log4net, seems old (uses .net 2.0 , reinvents wheel), nlog sounds promising asynchronous, yet again think can't encrypt. don't know if both of them totally thread safe.

should write own little logger? thought making logging thread, list (or queue) of logs, , using locking append list appropriate logs, logging thread convert (probably string, or parts string) log objects, encrypt them , save them file possible.

what think should do? thank ideas , answers.

nlog still maintained, on contrary of log4net. , yes, thread-safe. see my post on that.
have know how use correctly according use case scenario.

of encryption, nlog expandable , can write own log target encrypts content before sending files (or other). there lots of libraries offer such utility (rsa among others).

you seamlessly encrypt content in encryption service before sending log utility per se. here starter code sample, taken 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)); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -