Felix.Li 发表于 2023-9-13 14:20:36

wyn日志获取

本帖最后由 Felix.Li 于 2023-9-15 14:54 编辑

wyn如何获取日期。那获取之前要先知道日志的作用。
基本上其实日志有两种:
1.错误排查
2.sql获取(需要把日志级别调整成Verbose)
我们页面上有些错误其实没办法直接知道,可能需要日志才能具体定位为什么出问题了。
其次,wyn中页面上图表怎么展示的,数据处理的计算表达式,其实底层都是把表达式翻译成了sql。如果我们想获取这个sql。也可以看日志
那到底如何获取日志呢?我们有以下两种方法

1.系统后台直接获取。
wyn系统后台直接提供了日志获取的方法,可以通过如下操作(推荐):

在运维管理中可以直接获取到系统的日志

2.在服务器上获取:
打开wyn的安装目录。所有日志存在:
wyn安装目录\logs\*    这个目录下就是全部的日志文件。
一般除了日志文件,可能还需要配置文件。配置文件获取地址:
6.1及以前:    wyn安装目录\Monitor\conf\Wyn.conf
7.0及以后
                单节点标准版:    wyn安装目录\conf\Wyn.conf
                集群版本            wyn安装目录\Monitor\conf\Wyn.conf
配置文件搭配日志,更容易排查错误
:jy74a:

星海末 发表于 2023-12-20 23:12:46

版主,问下,做报表的时候,数据源那边使用sql的方式直接取数,保存 验证报错,这种有日志记录么,主要是使用odbc链接的数据库,带动态sql参数,不知道是哪里的问题。动态参数又可以在表达式那边解析出来

Eden.Sun 发表于 2023-12-21 09:12:02

星海末 发表于 2023-12-20 23:12
版主,问下,做报表的时候,数据源那边使用sql的方式直接取数,保存 验证报错,这种有日志记录么,主要是使 ...

您好,可以的,不过需要修改一下日志级别,您可以参考一下下面的帖子:
https://gcdn.grapecity.com.cn/showtopic-152217-1-1.html

tominson 发表于 2024-8-20 17:17:59

Eden.Sun 发表于 2023-12-21 09:12
您好,可以的,不过需要修改一下日志级别,您可以参考一下下面的帖子:
https://gcdn.grapecity.com.cn/ ...

看了日志,也看不懂,能不能设计器报错的时候,能报错误出来呀

2024-08-20 17:15:32.573+08:00 0HN5SVBRN1G6V:000006C9 GrapeCity.Enterprise.Dashboards.Plugin.Controllers.PivotController Failed to process pivot tasks in AnalysisService.
GrapeCity.Enterprise.Server.AnalysisModel.Analyzer.ModelX.ModelXAnalyzerException: Failed to generate SQL against execution engine.
---> GrapeCity.Enterprise.Analysis.Modeling.Query.Abstractions.DirectQueryException: Execution engine occurs an exception.
---> System.NullReferenceException: Object reference not set to an instance of an object.
   at GrapeCity.Enterprise.Analysis.Modeling.Query.DataAnalysisModelAdapter.EntityPathManager.GetEntityFullPath(IEntity baseEntity, IEntity targetEntity)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.DataAnalysisModelAdapter.EntityPathManager.GetPath(String baseEntityName, String targetEntityName)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.DataModel.Abstractions.ModelContextExtension.HasConsistentPath(IModelContext model, String baseEntityName, String targetEntityName)
   at System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.FilterManager.GetUseSecurityEnities(IReadOnlyList`1 QueryTreeEntities)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryStatementBuilder.GetQueryTreeInfor(HashSet`1 queryEntitys, String baseTableName, Boolean useOneToManyCalculateResult)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.QueryTableColumns(QueryTable table, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.BuildTable(QueryTable table, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.<>c__DisplayClass8_0.<Build>b__0(QueryTable table)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.QueryCTEColumns(QueryTable table, IEnumerable`1 keyColumns, IEnumerable`1 columns, Boolean bDistinct, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.BuildTable(QueryTable table, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.<>c__DisplayClass8_0.<Build>b__0(QueryTable table)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.EvaluateMeasureGroup(MeasureGroup measure, EngineSettings settings, QueryEntity& newQueryEntity)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.QueryMeasureGroup(MeasureGroup measureGroup, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.BuildTable(QueryTable table, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.<>c__DisplayClass8_0.<Build>b__0(QueryTable table)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.QueryCTEColumns(QueryTable table, IEnumerable`1 keyColumns, IEnumerable`1 columns, Boolean bDistinct, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.BuildTable(QueryTable table, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.<>c__DisplayClass8_0.<Build>b__0(QueryTable table)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.EvaluateMeasureGroup(MeasureGroup measure, EngineSettings settings, QueryEntity& newQueryEntity)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.QueryMeasureGroup(MeasureGroup measureGroup, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.BuildTable(QueryTable table, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.<>c__DisplayClass8_0.<Build>b__0(QueryTable table)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.QueryCTEColumns(QueryTable table, IEnumerable`1 keyColumns, IEnumerable`1 columns, Boolean bDistinct, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.BuildTable(QueryTable table, String baseEntity, EngineSettings settings)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryResultBuilder.<>c__DisplayClass8_0.<Build>b__0(QueryTable table)
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryModelActuator.BuildQueryModel(QueryTable table, EngineSettings settings)
   --- End of inner exception stack trace ---
   at GrapeCity.Enterprise.Analysis.Modeling.Query.ExecutionEngine.QueryModelActuator.BuildQueryModel(QueryTable table, EngineSettings settings)
   at GrapeCity.Enterprise.Server.AnalysisModel.Analyzer.ModelX.GeneralModelAnalyzer.ModelDAnalyzer.<>c__DisplayClass20_0.<BuildWithDAXEngine>b__0(ITable x)
   at System.Linq.Enumerable.SelectListIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectListIterator`2.ToList()
   at GrapeCity.Enterprise.Server.AnalysisModel.Analyzer.ModelX.GeneralModelAnalyzer.ModelDAnalyzer.BuildWithDAXEngine(IDataAnalysisModel patchedModel, AggregationModel originalQueryModel, IReadOnlyDictionary`2 originalExtensiveConfigs, String providerName)
   at GrapeCity.Enterprise.Server.AnalysisModel.Analyzer.ModelX.GeneralModelAnalyzer.ModelDAnalyzer.<>c__DisplayClass12_0`1.<<CreateAnalysisTask>b__0>d.MoveNext()
   --- End of inner exception stack trace ---
   at GrapeCity.Enterprise.Server.AnalysisModel.Analyzer.Shared.AnalysisResultPart.FaultedAnalysisResultData.get_ColumnCount()
   at GrapeCity.Enterprise.Dashboards.Plugin.Controllers.PivotController.Pivot(String datasetId, String dashboardId, String sessionId, String pivotRequest, PermissionHelper permissionHelper, IConfiguration configuration, ICorrelationContextAccessor correlationContextAccessor, IAuditLogService auditLogService, IExecuteSession executeSession)
2024-08-20 17:15:32.574+08:00 0HN5SVBRN1G6V:000006C9 Serilog.AspNetCore.RequestLoggingMiddleware Request finished HTTP/2 POST /api/pivot - 200 application/json; charset=utf-8 275.4435 ms
2024-08-20 17:15:32.589+08:00 0HN5SVBRN1G6V:000006C5 Serilog.AspNetCore.RequestLoggingMiddleware Request finished HTTP/2 POST /api/pivot - 200 application/json; charset=utf-8 298.9803 ms

Felix.Li 发表于 2024-8-21 10:55:49

您好,系统的日志更多的是用来监控服务的。
一般设计器中的错误,在设计器使用时会有相关报错。这个您不需要查看日志。然后看这个日志报错,应该是仪表板查询数据请求报错,可以找到对应的仪表板,看一下是哪一个的数据查询失败,重点关注:
1.数据源是否可以正常请求
2.数据集和数据模型是否和数据源匹配
3.仪表板使用层面数据计算表达式是否有报错,或者计算表达式计算错误。
如果要详细排查问题的话,您方便开一个新帖子我们在查看
:mj72:

Eden.Sun 发表于 2024-8-21 10:56:06

tominson 发表于 2024-8-20 17:17
看了日志,也看不懂,能不能设计器报错的时候,能报错误出来呀

2024-08-20 17:15:32.573+08:00 ...

这篇教程是介绍如何获取日志的,不是解决具体问题的。
您可以在求助中心发个帖子,描述一下您的现象,上传日志,我们具体帮您看一下。
https://gcdn.grapecity.com.cn/showforum-201-1.html


页: [1]
查看完整版本: wyn日志获取