Skip to content
 
 

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Duration

Some .Net code to track how long things take in a using statement

Usage

using (new DurationLogger((msg) => _logger.Debug(msg), "code_section.login"))
{
  // Do something that takes a long time, like make a HTTP request.
}

The argument passed to logging lambda expression will be:

code_section.login=5ms

One way to use this is to pass a function that logs to a log4net logger.

About

Some .Net code to track how long things take in a `using` statement

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages