Wasatch.NET 2.4.14
.NET application driver for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
WasatchNET.ILogger Interface Reference

This interface is provided for COM clients (Delphi etc) who seem to find it useful. I don't know that .NET users would find much benefit in it. More...

Inheritance diagram for WasatchNET.ILogger:
[legend]

Public Member Functions

void debug (string fmt, params Object[] obj)
 log a debug message
 
bool debugEnabled ()
 Whether debugging is enabled.
 
bool error (string fmt, params Object[] obj)
 log an error message
 
string getLastError ()
 peel-off the most recent error
 
bool hasError ()
 whether any recent errors have occurred
 
void hexdump (byte[] buf, string prefix="")
 
void info (string fmt, params Object[] obj)
 log an info message
 
void logString (LogLevel lvl, string msg)
 log a string at arbitrary level w/o arguments
 
void save (string pathname)
 write TextBox contents to a text file
 
void setPathname (string path)
 If you'd like log messages written to a text file, specify the path here.
 
void setTextBox (TextBox tb)
 If you're developing in WinForms, pass a TextBook into the Logger for instant visualization!
 

Properties

LogLevel level [get, set]
 

Detailed Description

This interface is provided for COM clients (Delphi etc) who seem to find it useful. I don't know that .NET users would find much benefit in it.

Member Function Documentation

◆ debug()

void WasatchNET.ILogger.debug ( string  fmt,
params Object[]  obj 
)

log a debug message

Parameters
fmtsee String.Format() fmt
objsee String.Format() args

Implemented in WasatchNET.Logger.

◆ debugEnabled()

bool WasatchNET.ILogger.debugEnabled ( )

Whether debugging is enabled.

Returns
true if debugging is enabled

Implemented in WasatchNET.Logger.

◆ error()

bool WasatchNET.ILogger.error ( string  fmt,
params Object[]  obj 
)

log an error message

Parameters
fmtsee String.Format() fmt
objsee String.Format() args
Returns
false, because that's convenient for many cases

Implemented in WasatchNET.Logger.

◆ getLastError()

string WasatchNET.ILogger.getLastError ( )

peel-off the most recent error

Returns
the most recent error message

other errors will remain in the "recent" queue; this does not necessary clear hasError()

Implemented in WasatchNET.Logger.

◆ hasError()

bool WasatchNET.ILogger.hasError ( )

whether any recent errors have occurred

Returns
true if one or more error messages are pending retrieval

Implemented in WasatchNET.Logger.

◆ hexdump()

void WasatchNET.ILogger.hexdump ( byte[]  buf,
string  prefix = "" 
)

Implemented in WasatchNET.Logger.

◆ info()

void WasatchNET.ILogger.info ( string  fmt,
params Object[]  obj 
)

log an info message

Parameters
fmtsee String.Format() fmt
objsee String.Format() args

Implemented in WasatchNET.Logger.

◆ logString()

void WasatchNET.ILogger.logString ( LogLevel  lvl,
string  msg 
)

log a string at arbitrary level w/o arguments

Parameters
lvla valid LogLevel
msgmessage

Provided for client languages that have difficulty passing an empty params Object[] array

Implemented in WasatchNET.Logger.

◆ save()

void WasatchNET.ILogger.save ( string  pathname)

write TextBox contents to a text file

Parameters
pathnamepath to create

only works if setTextBox() has been called; otherwise, use setPathname()

Implemented in WasatchNET.Logger.

◆ setPathname()

void WasatchNET.ILogger.setPathname ( string  path)

If you'd like log messages written to a text file, specify the path here.

Make sure the directory exists and is writable.

Parameters
pathoutput path (e.g. "\\tmp\\WasatchNET.log")

Implemented in WasatchNET.Logger.

◆ setTextBox()

void WasatchNET.ILogger.setTextBox ( TextBox  tb)

If you're developing in WinForms, pass a TextBook into the Logger for instant visualization!

Parameters
tbthe TextBox control where you would like log messages to appear

Implemented in WasatchNET.Logger.

Property Documentation

◆ level

LogLevel WasatchNET.ILogger.level
getset

Implemented in WasatchNET.Logger.


The documentation for this interface was generated from the following file: