\RG3.PF.Abstractions\Interfaces\LogConsoleAbstract.cs

 public async virtual Task Write(PFGlobalParameter pf, string message, params object[] args)
        {
            await Task.Run(() =>
            {
                _logger.LogWarning($"[LogConsoleAbstract]{message}", args);

            });
        }
        private readonly LogConsoleAbstract _logConsoleAbstract;



        /// <summary>
        /// 
        /// </summary>
        /// <param name="logConsoleAbstract"></param>
        /// <param name="cache"></param>
        /// <param name="httpClientFactory"></param>
        /// <param name="capBus"></param>
        /// <param name="popedomPushAbstract"></param>
        public PushPullDataEventBusProvider(LogConsoleAbstract logConsoleAbstract)
        {
            _logConsoleAbstract = logConsoleAbstract;
        }


  await _logConsoleAbstract.Write(pf, $"【Data】【{pfMapper.ModuleKey}】【pushpull.data.services.detail】【推送开始】");

/ws/api/v3/logs

RG3.BO.Core\Hubs\LogsHub.cs


 app.UseEndpoints(endpoints =>
            {
                //endpoints.MapHub<ChatHub>("/ws/api/v3/chat");
                var ws = _configuration.GetValue<bool>("websoket:open");
                //模块数据变更通知
                if (ws) endpoints.MapHub<MkeyHub>("/ws/api/v3/mkey");
                //控制台日志数据
                if (ws) endpoints.MapHub<LogsHub>("/ws/api/v3/logs");
                endpoints.MapControllers();
            });

\rg3-cli\src\main.js

import reqWsLog from "@/req-websoket";
try {
    reqWsLog.url = window.$appConfig.api.root + "/ws/api/v3/logs";
    reqWsLog.build();
} catch (e) {
    console.log(`websoket开启失败[${reqWsLog.url}]`);
}
Vue.prototype.$reqWsLog = reqWsLog;
文档更新时间: 2023-01-27 15:40   作者:admin