Public Class clsLog Dim db As New clsDB Public Enum Logtype Information = 0 Wartning = 1 ApplError = 2 End Enum Public Function Writelog(ByVal entry As String, ByVal Ltype As Logtype) If Ltype >= My.Settings.LogLevel Then db.WriteLog(entry, Ltype) End Function End Class