1. Entry into the error log

    Artikel: AN0001932Aktualisiert:
    Die vorgegebene Sprachenversion vom Artikeltext wird angezeigt, weil es kein Text von der ausgewählten Sprache und Version gibt.

    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);

×