ObjectGears Help

Forum   ObjectGears (Version:

Entry into the error log

This example shows how to write into ErrorLogu.

Simple message:

OG.Log.Write( 'text do logu');

Message with information where the error/event occured:

OG.Log.Write( 'text do logu', 'při akci XY');

Above methods Write (similarly like method WriteException) represent an error entry in the log. However, after certain number of entries of the same error into the log (depending on web.config setup) errors get cached and only number of error occurence is written into the log. Therefore, it may be more suitable to use function WriteInfo or WriteVariableInfo. The second function automatically performs conversion of variables to text.

OG.Log.WriteInfo('My info');
var i = 10;
OG.Log.WriteVariableInfo('i=', i);

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information