作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 Ektron 8.6 工作
我正在尝试在我的 ektron 网站的 EkException 中使用辅助函数。
我尝试使用以下代码:
Exception ex=new Exception("Test exception");
EkException.LogException(ex,System.Diagnostics.EventLogEntryType.Information);
LogEventEntry entry=new LogEventEntry();
entry.EventName="Test event";
entry.Timestamp=DateTime.Now;
entry.UserID=22;
entry.VisitorID="Test";
EkException.AddEventEntry(entry);
EkException.WriteToEventLog("Myapp",System.Diagnostics.EventLogEntryType.Information);
最佳答案
你想使用的类: Ektron.Cms.Instrumentation;
Log.WriteMessage(“我的消息”, LogLevel.Verbose);
请记住,您必须在 web.config 中打开 LogLevel。
Web.config,将 LogLevel 更新为“4”。
Instrumentation.config,将“Trace”添加到“Verbose”
<add switchValue="All" name="Verbose">
<listeners>
<add name="Event Log" />
<add name="Trace" />
</listeners>
Ektron.Cms.Instrumentation.Log.WriteError("error");
Ektron.Cms.Instrumentation.Log.WriteWarning("warning");
Ektron.Cms.Instrumentation.Log.WriteInfo("info");
关于ektron - Ektron 中的 EkException 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15632798/
我在 Ektron 8.6 工作 我正在尝试在我的 ektron 网站的 EkException 中使用辅助函数。 我尝试使用以下代码: Exception ex=new Exception("Te
我是一名优秀的程序员,十分优秀!