mCore™ .NET SMS Library 1.2

mCore.LogType Enumeration

Description:

The LogType enumeration specifies the LogType property value, which defines the type of logging.

Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)

Members:

Member Name Description
NoLog No error and/or event logging
ErrorLog Only error messages are logged
ErrorEventLog Errors and key process stages are logged

Exceptions:

mCore.GeneralException

Usage Example:

Visual Basic
Public Class MyClass
   Public WithEvents objSMS As New mCore.SMS

   Public Sub InitializeLog()
      Try
         objSMS.LogFolderPath = "C:\MyLogs"
         If objSMS.LogSize > 500 Then
            objSMS.ClearLog(10)
         End If
         objSMS.LogType = mCore.LogType.ErrorEventLog

      Catch ex As mCore.GeneralException
         MsgBox(ex.Message, MsgBoxStyle.Critical, "mCore Demo")

      Catch ex As Exception

      End Try
   End Function
End Class
 
C#
class MyClass
{
   public mCore.SMS objSMS = new mCore.SMS();
   public static void InitializeLog()
   {
      try
      {
         objSMS.LogFolderPath = "C:\\MyLogs";
         if (objSMS.LogSize > 500)
         {
            objSMS.ClearLog(10);
         }
         objSMS.LogType = mCore.LogType.ErrorEventLog;
      }

      catch (mCore.GeneralException e)
      {
         MessageBox.Show(e.ToString());
      }
      catch (Exception e)
      {
      }
   }
}

See Also:

mCore.SMS.LogType Property

 

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved