HotPatchLog.cs 520 B

1234567891011121314151617
  1. using System;
  2. using UnityEngine;
  3. namespace HotPatch
  4. {
  5. public static class HotPatchLog
  6. {
  7. public const string Prefix = "[HotPatch]";
  8. public static void Info(string message) => Debug.Log(Prefix + " " + message);
  9. public static void Warning(string message) => Debug.LogWarning(Prefix + " " + message);
  10. public static string SafeUrl(Uri uri) => uri == null ? "<none>" :
  11. uri.GetComponents(UriComponents.SchemeAndServer | UriComponents.Path, UriFormat.UriEscaped);
  12. }
  13. }