Questions tagged [exception-logging]

Writing error and exception information to a log file or database for review or research.

Exception-logging is the practice of writing error and exception information to a log file or database for review or research by debuggers, administrators, developers, etc.

39 questions
2
votes
1 answer

Is it possible to change Enterprise Library logging listener setting programmatically?

I'm using Ent Lib 5, and I need to be able to update the databaseInstanceName property of Microsoft.Practices.EnterpriseLibrary.Logging.Database.FormattedDatabaseTraceListener listener. The databaseInstanceName is defined in my app.config, but I…
2
votes
1 answer

Distinguish exceptions and determine what to log

Is there any known approach for logging different information depending on the exception type? The idea would be only log relevant information per exception type. eg: known exceptions/business logic exceptions don't need a stack trace logged, since…
Hélder Gonçalves
  • 3,822
  • 13
  • 38
  • 63
2
votes
1 answer

log4net on WebApi 2.1 using ExceptionLogger

How does one properly implement WebApi 2.1's ExceptionLogger so that log4net logs the correct values for method, location and line? What I'm trying to achieve is a global exception logger to log all unhandled exceptions in a WebAPI 2.1 v5.1.2 app…
Bill
  • 2,382
  • 2
  • 24
  • 27
2
votes
5 answers

Is it possible to print extra custom fileds along with the StackTrace while using log4j

I have this program as shown below , right now its only printng the stacktrace . my question is that , is it possible to get the stack trace and also a custom field , here in my case i need 1090099 Please tell me if its possible ?? package…
user663724
2
votes
3 answers

Exception logging in JavaScript, capture stack trace

I used https://github.com/eriwen/javascript-stacktrace to capture stack trace when exception happens. In some cases the logged information looks very strange, for example the user uses IE9 and the logged message is at {anonymous}() at…
hardywang
  • 4,864
  • 11
  • 65
  • 101
1
vote
0 answers

My exception logging aspect is logging the same exception twice

I'm writing a stand alone application, that has to start up and be left running unattended for long periods of time. Rather than have exceptions bring it to a halt, it needs to log the exception with enough information for the support people to…
Scott The Scot
  • 47
  • 1
  • 1
  • 7
1
vote
3 answers

What is the most efficient and performant logging solution for ASP.NET?

I want to add logging to the ASP.NET 2.0 web site that I've inherited from a previous developer. The application just spits out exceptions when they occur, and there's no record of financial transactions that have executed. I've been looking at…
Robert S.
  • 25,266
  • 14
  • 84
  • 116
1
vote
5 answers

is logging an exception on the code of the Exceptions base class a good design approach?

some friends just finished the implementation of an app and they use Custom Exceptions. something that took my attention is that when a custom exception was raised they logged the exception in the code of the exception base class they implemented.…
Oscar Cabrero
  • 4,168
  • 8
  • 29
  • 49
1
vote
1 answer

Try/Catch in Global.asax while logging errors to db needed?

So I handle all exceptions in my project within my Global.asax page. For example, on a random page I could have: Protected Sub SomeFunction() Try 'do something here Catch ex As Exception Throw ex …
ryanulit
  • 4,983
  • 6
  • 42
  • 66
1
vote
1 answer

Viewing ELMAH logs through the web interface on a Live application

I have included elmah.mvc into an Asp.Net MVC application for logging exceptions and custom error logs. It is working fully as intended and I can view the logs within my ELMAH_Error table using a SQL Server, and as well from the web interface…
chri3g91
  • 1,196
  • 14
  • 16
1
vote
1 answer

How to log unhandled exceptions in a vb.net class library project?

I'm creating an add-in for Solidworks EPDM (example from API help). This is a class library (.dll) project which is added to EPDM and allows some custom functions to be added to the program. I want to add logging for unhandled errors so that when…
CBRF23
  • 1,340
  • 1
  • 16
  • 44
1
vote
1 answer

how to change error logging location without modifying code in C# application?

I used Nlog for logging exceptions in my C# windows application and had a file called LogConfig.cs which has all the details about the location (path) and file name where to store these exceptions. Now if I want to change the location where these…
rookie_developer
  • 1,359
  • 3
  • 15
  • 27
0
votes
0 answers

Improving Frontend Error Logs with Global Exception Handling in Angular

I recently learned about logging errors in my frontend application. I implemented a basic global exception handler to log any occurring exceptions. However, I encountered an issue where the stack trace wouldn't always provide the correct function…
0
votes
0 answers

What is the right way to log the runtime exceptions in Java using log4j2?

I have a RuntimeException called DuplicateEdgeException which is thrown when the user provides duplicate edges to the graph. And I am not handling this exception and just throwing it when that event occurs. I am logging the error in the…
Shri
  • 109
  • 9
0
votes
1 answer

Recommended error monitoring / exception logging platforms or solutions

I'm working with a group of students on a web application built with ASP.NET Core and Angular. The project is going in production in the near future, but before we go live we want a error monitoring / exception logging solution. I did some research…