# ILogger

Description:

`ILogger` is an interface for accessing the OS logger.
```cpp
import "OxSvrSpt.idl"
```
Public Methods:
```cpp
HRESULT Log ([in] BSTR Message, [in] LogLevelEnum Level, [in, defaultvalue("")] BSTR FileName, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)
HRESULT Error ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)
HRESULT Info ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)
HRESULT MethodEntry ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)
HRESULT Debug ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)
HRESULT Trace ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)
HRESULT Init ([in] BSTR FileName, [in, defaultvalue("")] BSTR Alias)
```
Documentation of Element Functions:

* `HRESULT Debug ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)`

`Debug` logs the passed message at the debug level.

Parameters:

: `Message` message to be passed

: `Function` name of the function where the log entry occurs. If not specified, an empty string appears in the log protocol.

: `Line` source line to be logged. If not specified, 0 appears in the log protocol.

* `HRESULT Error ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)`

`Error` logs the passed message at the error level.

Parameters:

: `Message` message to be passed

: `Function` name of the function where the log entry occurs. If not specified, an empty string appears in the log protocol.

: `Line` source line to be logged. If not specified, 0 appears in the log protocol.

* `HRESULT Info ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)`

`Info` logs the passed message at the info level.

Parameters:

: `Message` message to be passed

: `Function` name of the function where the log entry occurs. If not specified, an empty string appears in the log protocol.

: `Line` source line to be logged. If not specified, 0 appears in the log protocol.

* `HRESULT Init ([in] BSTR FileName, [in, defaultvalue("")] BSTR Alias)`

`Init` initializes the logger instance.

Parameters:

: `FileName` filename for all log entries

: `Alias` alias of the current library to be logged

* `HRESULT Log ([in] BSTR Message, [in] LogLevelEnum Level, [in, defaultvalue("")] BSTR FileName, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)`

`Log` logs the passed message at the specified level.

Parameters:

: `Message` message to be passed

: `Level` LogLevel to apply

: `FileName` name of the source file from which the log entry occurs. If not specified, an empty string appears in the log protocol.

: `Function` name of the function where the log entry occurs. If not specified, an empty string appears in the log protocol.

: `Line` source line to be logged. If not specified, 0 appears in the log protocol.

* `HRESULT MethodEntry ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)`

`MethodEntry` logs the method entry.

Parameters:

: `Message` message to be passed

: `Function` name of the function where the log entry occurs. If not specified, an empty string appears in the log protocol.

: `Line` source line to be logged. If not specified, 0 appears in the log protocol.

* `HRESULT Trace ([in] BSTR Message, [in, defaultvalue("")] BSTR Function, [in, defaultvalue(0)] long Line)`

`Trace` logs the passed message at the trace level.

Parameters:

: `Message` message to be passed

: `Function` name of the function where the log entry occurs. If not specified, an empty string appears in the log protocol.

: `Line` source line to be logged. If not specified, 0 appears in the log protocol.
