Class Tracker
- Namespace
- Dynamicweb.Diagnostics.Tracking
- Assembly
- Dynamicweb.Core.dll
The Class Tracker represents tracker of log entries
- Inheritance
-
Tracker
- Implements
- Inherited Members
Properties
LogFolder
Gets the log folder.
Property Value
- Directory
Info The log folder.
Status
Gets related Status instance
Property Value
Methods
DeleteTrackerHistory(string)
Delete tracker history
Parameters
subpath
stringThe subpath under Base
Folder to delete. Format: {path1}{path2..{pathN} will delete the folder {pathN} and all its contents.
Dispose()
Stops the tracker
Dispose(bool)
Stops the tracker
Parameters
disposing
bool
Fail(string, Exception?)
Records a fail with given reason in logs and stops the tracker
Parameters
GetStatusHistory(string)
Gets the 10 newest Status elements in the specified subpath. The list is sorted by date in descending order.
Parameters
subpath
stringThe subpath under Base
Folder to Status elements from. Format: {path1}{path2}...{pathN} will get all Status elements in {pathN}.
Returns
- IEnumerable<Status>
A list of Status elements
GetStatusHistory(string, int)
Gets the newest Status elements in the specified subpath. The list is sorted by date in descending order.
Parameters
subpath
stringThe subpath under Base
Folder to Status elements from. Format: {path1}{path2}...{pathN} will get all Status elements in {pathN}.count
intThe number of Status elements to get.
Returns
- IEnumerable<Status>
A list of Status elements
GetTracker(string)
Gets a Tracker ready to be used.
Parameters
subpath
stringThe subpath under Base
Folder to store Status elements.
Returns
IncrementCounter()
Increses Status current count by 1
IncrementCounter(int)
Increses Status current count by given increment
Parameters
LogException(string, Exception?)
Logs and exception
Parameters
LogInformation(string, params object?[])
Logs the information.
Parameters
Start()
Starts the tracker
Remarks
if not yet started - captures start time, otherwise does nothing
Stop()
Stops the tracker
Remarks
if not yet stoped or still started - captures end time, otherwise does nothing