Page tree
Skip to end of metadata
Go to start of metadata

Registers a source of logging with the Logging API. Logging sources are the entry point whereby your components log events to the system. 

Syntax

Parameters

lpLogSourceSettings
Pointer to the source settings object. See LogSourceSettings 
lpLoggerSettings [Optional]
Pointer to the LoggerSettings for the log source. Can be NULL.

Return Value

Type: LogHandle
The LogHandle associated with the newly registered log source or NULL if the registration failed. If a non NULL is returned then the handle can be used for logging operations

Remarks

LogRegisterSource not only creates a log source but also attaches it to the appropriate logger. For new log sources this will be the "Default" logger as specified by the user, but if your log source has previously been attached to a different logger, then it will be reattached to it so that logging can continue to be output to the correct location.

 

Examples

See Also

LogUnregisterSource