Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
136 views

I'm writing an application that needs to log error/ exception messages but should still continue execution if it not a fatal error

I'm writing an application that needs to log error/ exception messages but should still continue execution if the error is not a fatal error. I was thinking of making a method that returns a Task but ...
0
votes
2answers
137 views

Handling logging when there is no internet access

I'm developing an application that handles sales for multiple clients, when the client sells a particular item, that information should be send to the admin. The count of each item sold and the item ...
16
votes
6answers
9k views

Try/Catch/Log/Rethrow - Is Anti Pattern?

I can see several post where importance of handling exception at central location or at process boundary been emphasized as a good practice rather than littering every code block around try/catch. I ...
1
vote
2answers
159 views

Optional logger for an API implementation

Say I want to create a C# implementation of an API for some 3rd party service, and I want to have an option to get the json posts and responses out somehow, what would be an elegant way of doing that? ...
5
votes
2answers
4k views

Should I be logging every request in a web application?

I know that logging is supposed to tell a story about what your users are doing. Eg: User 1 created a thing User 2 deleted a thing User 1 tried to access a thing and encountered an error This ...
10
votes
8answers
5k views

Is it possible to keep logging code completely outside the business logic?

With the help of AOP, I can remove the logging code from my business logic. But I think it can only be used to log simple things (i.e. logging method entry/exit and parameter values). However, what ...
2
votes
2answers
2k views

Logging Implementation in a project using a class library or a web service

I'm currently working on a requirement to implement logging in multiple projects and require to develop a enterprise level logging application that can be using in n number of projects. Present ...
4
votes
3answers
864 views

Logging paradigms, DI/IoC, object hierarchies

I'm trying to figure out how to support the following example scenario ill be using C# as the example language. Scenario NASA is sending Rovers and Satellites to different Planets these vehicles ...
1
vote
1answer
92 views

Adding custom object-string transformers to a global static list field in my logging library. Is there a better way?

I'm writing a central logging library. In it is an AutoLogAttribute method attribute that automatically logs entry/exit of methods and their parameters (automatically serialized) like this: [AutoLog] ...
1
vote
1answer
545 views

Standalone library for error logging?

Background Here is how I currently log any exceptions that occur in my code: Pass each object instance the path to a file where I want all of the logging to happen. Each of the objects have their ...
110
votes
3answers
39k views

Benefits of Structured Logging vs basic logging

We're building a new app and I'd like to include structured logging. My ideal setup would be something like Serilog for our C# code, and Bunyan for our JS. These would feed into fluentd and then could ...
2
votes
2answers
1k views

Integrating Logging Library into multilayer Object: What is a good structure?

I am integrating Serilog into and existing multilayer library that I've create. The previous logging technique I used was simply passing a string up the layers with events. I'd like to get away from ...
7
votes
1answer
2k views

Log and trace with Azure Application Insights only (instead of combining NLog and AppInsights) in Asp MVC [closed]

I was going through several blog posts at stackoverflow and programmers and I am still a bit confused. You can install NLog (or some other logging lib) and start logging quite fast and then you can ...
5
votes
2answers
775 views

Strategies to analyze collected exceptions

We want to add error feedback to our application. I had a look at existing solutions (e.g. raygun.io), but these work "in the cloud", which is a no-go for us: most installations of our application ...
0
votes
3answers
3k views

Convention for logging within nested try catch blocks

I've looked at this question but it doesn't really help solve my dilemma. System 1 calls system 2 within a try catch, the method in system 2 has it's own try catch, which sadly handles an exception ...
0
votes
1answer
294 views

Tracing and Logging per item instead of per application

I'm building a service in .NET that process "things" in the background and I'd like to trace the execution of these things per item, not per application. Most logging frameworks (I'm familiar with ...
0
votes
1answer
210 views

What possible things to log in mvc webapp [closed]

I'm about to learn to handle logging in my c# asp.net mvc app and are going to store my log in a noSQL-db. How to handle the logging is done. The thing is I'm having a hard time to figure out possible ...
-5
votes
1answer
284 views

Distinct Log and Trace for each object in .NET [closed]

I am dealing with very complex objects in .NET (in my case a finite element model that can consist of thousands of other objects say a Model instance have a large list of Element instance). I would ...
5
votes
2answers
424 views

Is ok to leave untranslated advanced log?

I just had a little fight with my boss over this topic (well, the boss always wins so I will do what he wants to be done) but I'd like to have the opinion of others about this: We are making a ...
1
vote
2answers
516 views

Logging page/session ID in an inner module

We have a C# ORM module that generates queries. It logs generated queries and other information into the error/trace file. It is used by our web application. Most of our queries are generated ...
-1
votes
2answers
18k views

How to do logging in console application [closed]

I have a simple console application that will be deployed as a scheduled job. Below is its pseudo code Main(string[] args) { //get xml string from database Reports reports = ReportsDB....
5
votes
2answers
7k views

Design pattern for logging changes in parent/child objects saved to database

I’ve got a 2 database tables in parent/child relationship as one-many. I’ve got three classes representing the data in these two tables: Parent Class { Public int ID {get; set;} .. other ...
4
votes
2answers
1k views

Log design approach

Logging was always a nightmare for me! Now I have to implement it again for a proxy system. In this proxy application, some systems ask proxy system to call some other services. What I have to log is ...
6
votes
3answers
3k views

Exception Handling Frequency/Log Detail

I am working on a fairly complex .NET application that interacts with another application. Many single-line statements are possible culprits for throwing an Exception and there is often nothing I can ...
21
votes
7answers
61k views

Best practices for logging user actions in production

I was planning on logging a lot of different stuff in my production environment, things like when a user: Logs In, Logs Off Change Profile Edit Account settings Change password ... etc Is this a ...
9
votes
3answers
2k views

How should I handle logging when I create libraries for others?

All. I am creating some libraries for other teams in my company. They all have different logging mechanisms. I want to provide trace information of what my libraries are doing. What should I to ...