mCore™ .NET SMS Library 1.2

mCore.SMS.LogFolderPath Property

Description:

The LogFolderPath property sets the folder in which the log file 'mCoreLib.log' is written. The value returned by the property LogSize and the action of ClearLog method is also dependent on the value of LogFolderPath.

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

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
mCore.SMS.LogSize Property
mCore.SMS.DebugMode Property
mCore.SMS.ClearLog Method

 

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved