/// <summary> /// Initializes a new instance of the <see cref="LogEvent"/> class. /// </summary> /// <param name="logCallback">The callback method to invoke when the /// <c>Log</c> method is called.</param> /// <param name="loglevel">The log event's loglevel.</param> /// <param name="time">The time of the log event.</param> internal LogEvent(LogCallbackDelegate logCallback, TLoglevel loglevel, DateTime?time = default) { this.logCallback = logCallback ?? throw new ArgumentNullException(nameof(logCallback)); this.Loglevel = loglevel; this.Time = time ?? DateTime.Now; this.Details = new List <object>(); }
public void UnregisterLogCallback(LogCallbackDelegate handler) { if (null != handler) { this.logCallbackEventHandler -= handler; } }
private static void SetupDebugLogCallback() { LogCallbackDelegate callbackDelegate = new LogCallbackDelegate(LogCallback); System.IntPtr func = Marshal.GetFunctionPointerForDelegate(callbackDelegate); NativePlugin.SetLogFunction(func); }
public static void UnregisterLogCallback(LogCallbackDelegate handler) { if (handler != null) { DebugLog(null, "Remove log callback handler", new object[0]); LogCallbackEventHandler = (LogCallbackDelegate)Delegate.Remove(LogCallbackEventHandler, handler); } }
public static void RegisterLogCallback(LogCallbackDelegate handler) { if (handler != null) { DebugLog(null, "Add log callback handler", new object[0]); LogCallbackEventHandler = (LogCallbackDelegate)Delegate.Combine(LogCallbackEventHandler, handler); } }
/// <summary> /// Registers the log callback handler. /// /// If you need register logcallback using Application.RegisterLogCallback(LogCallback), /// you can call this method to replace it. /// /// <para></para> /// </summary> /// <param name="handler">Handler.</param> public static void RegisterLogCallback(LogCallbackDelegate handler) { if (handler != null) { DebugLog(null, "Add log callback handler: {0}", handler); _LogCallbackEventHandler += handler; } }
/// <summary> /// Unregisters the log callback. /// </summary> /// <param name="handler">Handler.</param> public static void UnregisterLogCallback(LogCallbackDelegate handler) { if (handler != null) { DebugLog(null, "Remove log callback handler"); _LogCallbackEventHandler -= handler; } }
public void InitCSharpModules() { LogCallbackDelegate logCallback = Log; var ipLog = Marshal.GetFunctionPointerForDelegate(logCallback); if (ipLog != null) { RegisterLogCallback(ipLog); } }
/// <summary> /// Will do the handshake between c++ and c# for delegates and function pointers. /// </summary> public void InitCSharpModules() { LogCallbackDelegate logCallback = Log; var dir = System.IO.Directory.GetCurrentDirectory(); var ipLog = Marshal.GetFunctionPointerForDelegate(logCallback); if (ipLog != null) { RegisterLogCallback(ipLog); } }
public formMain() { InitializeComponent(); logHandler = new LogCallbackDelegate(LoggerFunction); ANNWrapper.SetLogHandler(logHandler); DirectoryInfo Dir = new DirectoryInfo(Application.StartupPath + "\\ErrorRec"); if (!Dir.Exists) { Dir.Create(); } ANNWrapper.SetErrorRecordFolder(Application.StartupPath + "\\ErrorRec"); }
/// <summary> /// Registers the c# exception handler by set Application.RegisterLogCallback /// </summary> /// <param name="level">Level.</param> /// <param name="callback">Callback.</param> public static void RegisterExceptionHandler (LogSeverity level, LogCallbackDelegate callback) { if (Application.platform == RuntimePlatform.IPhonePlayer) { #if UNITY_IPHONE ios.Bugly.RegisterExceptionHandler(level, callback); #endif } else if (Application.platform == RuntimePlatform.Android) { #if UNITY_ANDROID android.Bugly.RegisterExceptionHandler(level, callback); #endif } }
public static extern bool UWK_Initialize(LogCallbackDelegate logcb, LogErrorDelegate errorcb, ProcessUWKEventDelegate processcb, UWKBetaDelegate betacb, IntPtr initJson);
/// <summary> /// Unregisters the log callback. /// </summary> /// <param name="handler">Handler.</param> public static void UnregisterLogCallback (LogCallbackDelegate handler) { if (handler != null) { DebugLog (null, "Remove log callback handler"); LogCallbackEventHandler -= handler; } }
/// <summary> /// Registers the log callback handler. /// /// If you need register logcallback using Application.RegisterLogCallback(LogCallback), /// you can call this method to replace it. /// /// <para></para> /// </summary> /// <param name="handler">Handler.</param> public static void RegisterLogCallback (LogCallbackDelegate handler) { if (handler != null) { DebugLog (null, "Add log callback handler"); LogCallbackEventHandler += handler; } }
public static extern int UWK_Initialize(LogCallbackDelegate logcb, LogErrorDelegate errorcb, ProcessMessageDelegate processcb, IntPtr initJson);
public static extern void egHMAC(IntPtr pEncryptor, byte[] pIn, int inSize, int inOffset, byte[] pOut, ref int outSize); // 0x00000001806AE7B0-0x00000001806AE890 public static extern void egsetEncryptorLoggingCallback(IntPtr userData, LogCallbackDelegate callback); // 0x00000001806AEB70-0x00000001806AEC10
public void RegisterExceptionHandler (LogSeverity level, LogCallbackDelegate callback) { _logLevel = level; if (callback != null) { _logCallbackDelegate += callback; } if (!_logCallbackRegister) { _logCallbackRegister = true; System.AppDomain.CurrentDomain.UnhandledException += OnUncaughtExceptionHandler; ECUnityHelper.RegisterLogCallback (OnLogCallback); PrintLog (LogSeverity.Log, "Register log callback"); } }
public static extern void SetLogHandler(LogCallbackDelegate logger);
/// <summary> /// Registers the exception handler. /// </summary> /// <param name="level">Level.</param> /// <param name="callback">Callback.</param> public static void RegisterExceptionHandler (LogSeverity level, LogCallbackDelegate callback) { BuglyAgent.GetInstance ().RegisterExceptionHandler (level, callback); }
private static extern void edf_set_log_function(LogCallbackDelegate pointer);
public static extern uint egread(IntPtr pConnectionHandler, byte[] arr, ref uint size); // 0x0000000180A10270-0x0000000180A10320 public static extern void egsetSocketLoggingCallback(IntPtr pConnectionHandler, IntPtr userData, LogCallbackDelegate callback); // 0x0000000180A10450-0x0000000180A104F0
public static extern void mame_set_log_callback(LogCallbackDelegate cb);
public void SetLogCallback(Action <string> callback) { _log = new LogCallbackDelegate(callback); }