DebugPublisher.cs 501 B

1234567891011121314151617181920212223242526
  1. using FreeRedis;
  2. namespace WCS.Core
  3. {
  4. public class DebugPublisher
  5. {
  6. private static RedisClient Redis;
  7. static DebugPublisher()
  8. {
  9. Redis = new RedisClient(Configs.DebugRedisUrl);
  10. }
  11. public static void Publish(string channel, string msg)
  12. {
  13. try
  14. {
  15. Redis.Publish(channel, msg);
  16. }
  17. catch
  18. {
  19. // TODO:日常日志
  20. }
  21. }
  22. }
  23. }