gpt4 book ai didi

c# - VS2010 Crystal 报表 : How do I set the logging level?

转载 作者:太空狗 更新时间:2023-10-29 19:47:18 26 4
gpt4 key购买 nike

由于 log4net 随 VS2010 的 CR 一起提供,因此记录内容是理所当然的。如何将 CR 日志级别设置为调试,以便弄清楚我的报告发生了什么?

我应该澄清一下,我已经在我的项目中使用了 log4net,我只是没有看到来自 CrystalReports 的任何东西。

最佳答案

此链接包含有关如何启用额外日志记录的详细信息:

https://apps.support.sap.com/sap/support/knowledge/public/en/0001470978

摘录:

  1. 使用记事本创建两个名为 logging-on.reg 和 logging-off.reg 的 .reg 文件。
  2. 将下面相应部分的文本复制到每个 .reg 文件中并保存。
  3. 将 .reg 文件复制到您需要进行日志记录的系统。
  4. 双击 logging-on.reg 文件并将内容合并到注册表中。
  5. 重新启动您正在监控的 IIS、服务或 Windows 应用程序。注意:如果 Crystal 运行时文件已在内存中,则日志记录将不起作用。
  6. 运行应用程序直到出现故障点或您的错误消息。
  7. 在临时目录中找到 .log 文件。
    • Windows XP; C:\Documents and Settings\\Local Settings\Temp
    • Windows Vista、7、Server 2008; C:\Users\\AppData\Local\Temp
    • 运行 Visual Studio IDE 的 Windows Server 2008 创建一个子文件夹\2(在我的例子中),VS 将其用作临时文件夹。这是日志文件所在的位置
  8. 他们将根据应用程序命名。例如,如果您的应用名为 mySlowReport.exe - 日志文件将被命名为:
    • mySlowReport.crpe.bkgrnd.log
    • mySlowReport.crpe.Diagnostics.log
    • mySlowReport.crpe.functions.log

Visual Studio 2010 Crystal 报表

注意 Crystal for Visual Studio 2010 创建的日志文件扩展名为 .GLF。

启用日志记录

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
"Destinations"=dword:00000003
"Position"=dword:00000003
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
"Destinations"=dword:00000003
"Position"=dword:00000003
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
"Destinations"=dword:00000003
"LogErrorsOnly"=dword:00000000
"Position"=dword:00000003
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
"Destinations"=dword:00000003
"Position"=dword:00000003
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
"Destinations"=dword:00000003
"Position"=dword:00000003
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
"Destinations"=dword:00000003
"LogErrorsOnly"=dword:00000000
"Position"=dword:00000003

禁用日志记录

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
"Destinations"=dword:00000000
"Position"=dword:00000000
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
"Destinations"=dword:00000000
"Position"=dword:00000000
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
"Destinations"=dword:00000000
"LogErrorsOnly"=dword:00000000
"Position"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
"Destinations"=dword:00000000
"Position"=dword:00000000
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
"Destinations"=dword:00000000
"Position"=dword:00000000
"LogErrorsOnly"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
"Destinations"=dword:00000000
"LogErrorsOnly"=dword:00000000
"Position"=dword:00000000

关于c# - VS2010 Crystal 报表 : How do I set the logging level?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11212891/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com