<cAppLog>.Log.Count.Warn

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > AppLog > cAppLog Class > <cAppLog> Methods > <cAppLog>.Log > <cAppLog>.Log.Count >

<cAppLog>.Log.Count.Warn

 

Description

 

Returns the total count of warning log entries emitted.

 

Syntax

 

count = <cAppLog>.Log.Count.Warn

 

Returns

 

None

 

Parameters

 

None

 

Remarks

 

The count starts at zero after creation of the logger.

 

Restrictions

 

See also

 

Examples

 

uses "AppLog"

 

dim myLog as new cAppLog

 

myLog.TextFile.FileName = APP_ScriptPath + "myApplication.log"

myLog.TextFile.Active   = %true

myLog.TextFile.Format   = "{Count} {Computer} {User} {Date} {DateUTC} {Time} {TimeUTC} {Level} {LevelChar} {LevelVerbose}: {Text}"

 

myLog.Log.Trace("Just some trace info")

myLog.Log.Debug("My first debug text")

myLog.Log.Debug("My second debug text")

myLog.Log.Info("Information no.1")

myLog.Log.Info("Information no.2")

myLog.Log.Info("Information no.3")

myLog.Log.Warn("Just a warning!")

myLog.Log.Error("Oh no, problem occurred!")

myLog.Log.Fatal("This is the end - fatal error occurred")

 

MsgBox 0, "Trace count:" + myLog.Log.Count.Trace + $CRLF +

          "Debug count:" + myLog.Log.Count.Debug + $CRLF +

          "Info  count:" + myLog.Log.Count.Info  + $CRLF +

          "Warn  count:" + myLog.Log.Count.Warn  + $CRLF +

          "Error count:" + myLog.Log.Count.Error + $CRLF +

          "Fatal count:" + myLog.Log.Count.Fatal + $CRLF