Adoxio / xRM-Portals-Community-Edition

The definitive edition of Microsoft Open Source Portals, supported by the experts in portals.
MIT License
107 stars 60 forks source link

Portal Error Log ADXTrace #69

Closed jasongdai closed 5 years ago

jasongdai commented 5 years ago

Are there portal error logs? If so, where are they located?

Hmm alternatively, how do I view ETW events logged using ADXTrace.cs? In web.config, I can set the logging level for ADXTrace.

Thanks for the help!

amervitz commented 5 years ago

You can view /trace.axd on the local machine to see the trace. See How to: View ASP.NET Trace Information with the Trace Viewer.

jasongdai commented 5 years ago

Thanks for the info! I can view /trace.axd on my local machine. FYI, in Web.config, under <system.diagnostics>, when I set <source name="ADXTrace" switchValue="Verbose">, I get the error below. I don't get the error when I set switchValue="Information". This is just a FYI though as all of the logging information I need is captured at Information level.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: [HttpException (0x80004005): Request is not available in this context] System.Web.HttpContext.get_Request() +12003584 System.Web.TraceContext.InitRequest() +239 System.Web.TraceContext.VerifyStart() +133 System.Web.TraceContext.Write(String category, String message, Exception errorInfo, Boolean isWarning, Boolean writeToDiagnostics) +153 System.Web.WebPageTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType severity, Int32 id, String message) +486 System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String format, Object[] args) +589 Adxstudio.Xrm.Diagnostics.Trace.Extensions.TraceEvent(TraceSource traceSource, PortalSettings settings, TraceEventType eventType, Int32 id, String format, Object[] args) in C:\Users\daij\source\repos\xRM-Portals-Community-Edition\Framework\Adxstudio.Xrm\Diagnostics\Trace\Extensions.cs:28 Adxstudio.Xrm.ADXTrace.TraceEvent(TraceEventType type, EventNames eventId, TraceCategory category, String message, String memberName, String sourceFilePath, Int32 sourceLineNumber) in C:\Users\daij\source\repos\xRM-Portals-Community-Edition\Framework\Adxstudio.Xrm\Diagnostics\Trace\ADXTrace.cs:258 Adxstudio.Xrm.ADXTrace.TraceVerbose(TraceCategory category, String message, String memberName, String sourceFilePath, Int32 sourceLineNumber, String portalUrl, String portalVersion, String portalProductionOrTrialType, String sessionId, String elapsedTime) in C:\Users\daij\source\repos\xRM-Portals-Community-Edition\Framework\Adxstudio.Xrm\Diagnostics\Trace\ADXTrace.cs:241 Adxstudio.Xrm.ADXTrace.TraceVerbose(TraceCategory category, String message, String memberName, String sourceFilePath, Int32 sourceLineNumber) in C:\Users\daij\source\repos\xRM-Portals-Community-Edition\Framework\Adxstudio.Xrm\Diagnostics\Trace\ADXTrace.cs:149 Adxstudio.Xrm.Web.Mvc.RouteCollectionExtensions.UseWithWriteLock(RouteCollection routes, Action 1 action) in C:\Users\daij\source\repos\xRM-Portals-Community-Edition\Framework\Adxstudio.Xrm\Web\Mvc\RouteCollectionExtensions.cs:91 Adxstudio.Xrm.Web.Modules.PortalRoutingModule.Init(HttpApplication application) in C:\Users\daij\source\repos\xRM-Portals-Community-Edition\Framework\Adxstudio.Xrm\Web\Modules\PortalRoutingModule.cs:77 System.Web.HttpApplication.InitModulesCommon() +195 System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1055 System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +367 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +264