/// <summary> /// Logs an interpolated string with the specified log level. /// </summary> /// <param name="level">Log levels to attach to the message. Multiple can be used with bitwise ORing.</param> /// <param name="logHandler">Handler for the interpolated string.</param> public void Log(LogLevel level, [InterpolatedStringHandlerArgument("level")] BepInExLogInterpolatedStringHandler logHandler) { if (logHandler.Enabled) { LogEvent?.Invoke(this, new LogEventArgs(logHandler.ToString(), level, this)); } }
/// <summary> /// Logs an entry to the internal logger instance if any log listener wants the message. /// </summary> /// <param name="level">The level of the entry.</param> /// <param name="logHandler">Log handler to resolve log from.</param> internal static void Log(LogLevel level, [InterpolatedStringHandlerArgument("level")] BepInExLogInterpolatedStringHandler logHandler) => InternalLogSource.Log(level, logHandler);