LogEntries without a .config file in a .NET application -


I am reading articles on logging from .NET applications. I want to perform a functional equivalent without using the .config file. Do I have code samples for it? Thank you

I think this code is wrong ... can you check? By the way, I worked like this:

  target.Token = "LOG_TOKEN"; Target.Ssl = false; Target.Debug = true; Target.Name = "Logantry"; $ {Date: format = zzz yyyy} $ {logger}: $ {LEVEL}, $ {message} $ {time} = $ {date: format = ddd MMM dd} $ {time: format = HH: mm: ss } $ {Date: format = zzz yyyy} "; Target.HttpPut = false; var config = new logging (); Config.AddTarget (" Logantry ", target); Var logging rule = new logging rule (" * ", LogLevel .Debug, Target); config.LoggingRules.Add (loggingRule); LogManager.configuration = config; LogManager.Configuration.Reload ();  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -