RxWebCore icon indicating copy to clipboard operation
RxWebCore copied to clipboard

Request Trace and Exceptions are not logging

Open mitanshu-patel opened this issue 4 years ago • 2 comments
trafficstars

Describe the bug

Whenever any API is called at that time log isn't getting recorded in RequestTraces and AuditRecords table. Also when any exception is generated then it isn't getting logged in ExceptionLogs table.

Exception Handling code:- image

Record log attribute:- image

Currently we have to manage exception logs in separate log file. Would be helpful for troubleshooting, if these exceptions and traces are getting logged in LogDB.

mitanshu-patel avatar Sep 03 '21 06:09 mitanshu-patel

@mitanshu-patel [RecordLog] is not used to log the request. You are mixing three things in one.

For Exception Logging : Share the code snippet of Configure method of Startup.cs file and make sure that HandleException to be called in the Security.cs file.

For Request Traces: Check the code in the Security.cs file that in the Security.cs file UseLogging method is called.

ajayojha avatar Sep 06 '21 08:09 ajayojha

@ajayojha , This is the Configure method code which we are using in Startup.cs:- image

For Exception Logging:- I kept debugger in code, HandleException method is getting called but data isn't getting stored in ExceptionLogs table.

For Request Traces:- UseLogging expects value for formal parameter 'databaseFacade' of 'Type'. Not able to understand what data to pass in this method.

mitanshu-patel avatar Sep 06 '21 09:09 mitanshu-patel