Skip to content

TJC-Tools/TJC.Logging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NuGet Version and Downloads count

Format

  • Timestamp
  • Location (Namespace, Type Name, Member Name, Line Number)
  • Specialty (E.g. Get, Set, Tracker)

Extensions

Debugging

Logs detailed information about the current execution location.

Logs detailed information about the current execution location, including a step number for debugging purposes.

Example
var step = 0; 
ILogger.LogStep(ref step);
// Do first step
ILogger.LogStep(ref step);
// Do second step

Trackers

Returns a LogTracker that is used to track the duration & status of a process.

Logs the duration & completion status of a process.

Logs the duration & completion status of a successful process.

Logs the duration & completion status of a failed process.


Get & Set

Logs the value of an object and returns the object.

Logs the before and after values of a property and set it when done.


Elapsed Time

TimeSpan.GetElapsedTime()

Returns a formatted string of the elapsed time.


Pluralize

string.Pluralize()

Returns a pluralized string if the count is greater than 1.