Пример #1
0
 public void Error(string message)
 {
     if (this.loggerHandle == IntPtr.Zero)
     {
         return;
     }
     NAdvLogNative.NAdvLog_Error(this.loggerHandle, message);
 }
Пример #2
0
        public enumLogLevel GetLogLevel()
        {
            if (this.loggerHandle == IntPtr.Zero)
            {
                return(enumLogLevel.Off);
            }

            return(NAdvLogNative.NAdvLog_GetLogLevel(this.loggerHandle));
        }
Пример #3
0
        public void Log(LogType logType, string message)
        {
            if (this.loggerHandle == IntPtr.Zero)
            {
                return;
            }

            NAdvLogNative.NAdvLog_Log(this.loggerHandle, logType, message);
        }
Пример #4
0
        public static bool Init()
        {
            int ret = NAdvLogNative.NAdvLog_Init();

            if (ret == 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #5
0
        public static string GetLogFile()
        {
            string filePath = string.Empty;

            try
            {
                IntPtr ptr = NAdvLogNative.NAdvLog_GetLogFile();
                filePath = Marshal.PtrToStringUni(ptr);
            }
            catch
            {
            }

            return(filePath);
        }
Пример #6
0
 static void ReleaseLogger(IntPtr loggerPtr)
 {
     NAdvLogNative.NAdvLog_ReleaseLogger(loggerPtr);
 }
Пример #7
0
 static IntPtr GetLogger(string name)
 {
     return(NAdvLogNative.NAdvLog_GetLoggerEx(name));
 }
Пример #8
0
 public static void SetLogFile(string logFile)
 {
     NAdvLogNative.NAdvLog_SetLogFile(logFile);
 }
Пример #9
0
 public static void Uninit()
 {
     NAdvLogNative.NAdvLog_Uninit();
 }