C-DEngine 5.105

TheSystemMessageLog..::..WriteToLogSafe Method (Int32, eDEBUG_LEVELS, Func<(Of <(<'TSM>)>)>, Boolean)

Writes a TSM to the SystemLog with a given ID, if the logLevel is greater than the configured debug level (TheBaseAssets.MyServiceHostInfo.DebugLevel). The TSM is only created if logging will actually occur. If the TSM creation fails, an alternate text is logged.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


[ConditionalAttribute]
public void WriteToLogSafe(
	int LogID,
	eDEBUG_LEVELS logLevel,
	Func<TSM> createMyText,
	bool NoLog
)
<ConditionalAttribute> _
Public Sub WriteToLogSafe ( _
	LogID As Integer, _
	logLevel As eDEBUG_LEVELS, _
	createMyText As Func(Of TSM), _
	NoLog As Boolean _
)
[ConditionalAttribute]
public:
void WriteToLogSafe(
	int^ LogID, 
	eDEBUG_LEVELS^ logLevel, 
	Func<TSM^>^ createMyText, 
	bool^ NoLog
)

Parameters

LogID
Type: Int32
Event ID of the entry
logLevel
Type: nsCDEngine.BaseClasses..::..eDEBUG_LEVELS
logLevel to be checked against the configured debug level.
createMyText
Type: Func<(Of <(<'TSM>)>)>
Function that creates a TSM with the Main Content of the Entry, i.e. () => new TSM(...).
NoLog
Type: Boolean
If set to true, the entry will not be stored to the StorageService or Disk