private static void PrintCert(PlatformLogLevel logLevel, X509Certificate2 cert, X509ChainStatus[] chainElementStatus, string chainElementInformation) { if (cert == null) { return; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(string.Format("Issuer name: {0}\n", cert.Issuer ?? string.Empty)); stringBuilder.Append(string.Format("Subject: {0}\n", cert.Subject ?? string.Empty)); stringBuilder.Append(string.Format("Serial: {0}\n", cert.SerialNumber ?? string.Empty)); stringBuilder.Append(string.Format("Certificate valid until: {0}\n", cert.NotAfter)); stringBuilder.Append(string.Format("Error status length: {0}\n", (chainElementStatus == null) ? 0 : chainElementStatus.Length)); stringBuilder.Append(string.Format("Chain Information: {0}\n", chainElementInformation ?? string.Empty)); X509KeyUsageExtension x509KeyUsageExtension = (cert.Extensions == null) ? null : (cert.Extensions["2.5.29.15"] as X509KeyUsageExtension); if (x509KeyUsageExtension != null) { stringBuilder.Append(string.Format("Key Usage Extension flags={0:X}\n", x509KeyUsageExtension.KeyUsages)); } if (chainElementStatus != null) { for (int i = 0; i < chainElementStatus.Length; i++) { X509ChainStatus x509ChainStatus = chainElementStatus[i]; stringBuilder.Append(string.Format("Error status={0}, info={1}", x509ChainStatus.Status, x509ChainStatus.StatusInformation ?? string.Empty)); } } Services.Logging.LogMessage(logLevel, stringBuilder.ToString()); }
internal static void LogMessage(PlatformLogLevel logLevel, string message) { PlatformLogLevel logLevel2 = FirebaseHandler.AppUtils.GetLogLevel(); if (logLevel < logLevel2) { return; } switch (logLevel) { case PlatformLogLevel.Verbose: case PlatformLogLevel.Debug: case PlatformLogLevel.Info: Debug.Log(message); break; case PlatformLogLevel.Warning: Debug.LogWarning(message); break; case PlatformLogLevel.Error: Debug.LogError(message); break; } }
public void LogMessage(PlatformLogLevel level, string message) { }
public void LogMessage(PlatformLogLevel level, string message) { FirebaseLogger.LogMessage(level, message); }