log.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. export declare enum LogLevel {
  2. INFO = "INFO",
  3. WARN = "WARN",
  4. ERROR = "ERROR"
  5. }
  6. interface ILogInfo {
  7. code: number;
  8. category: LogLevel;
  9. message: string;
  10. solution?: string;
  11. }
  12. /**
  13. * 诊断信息采用单 Code 模式对应一个 Message 的模式
  14. * 采用 4 位 Code 表示错误码,当遇到一个解决方案,
  15. * 1xxx => 一些警告信息
  16. * 4xxx => 用户使用上的问题
  17. * 5xxx => 框架或者客户端造成的异常
  18. */
  19. export declare const diagnosticMessageMap: {
  20. config_debug_deprecated: ILogInfo;
  21. dd_config_wrap_deprecated: ILogInfo;
  22. not_support_event_on: ILogInfo;
  23. not_support_event_off: ILogInfo;
  24. repeat_config: ILogInfo;
  25. JsBridge_init_fail: ILogInfo;
  26. auto_bridge_init_error: ILogInfo;
  27. JsBridge_init_fail_dd_config: ILogInfo;
  28. not_support_env: ILogInfo;
  29. call_api_support_platform_error: ILogInfo;
  30. call_api_config_platform_error: ILogInfo;
  31. call_api_on_before_error: ILogInfo;
  32. call_api_on_after_error: ILogInfo;
  33. };
  34. export declare const formatLog: (diagnosticMessage: ILogInfo, ...args: string[]) => string;
  35. export {};