Click here to Skip to main content
15,886,963 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: user data system for a web-based e-mail service Pin
Gerry Schmitz19-Jan-24 13:24
mveGerry Schmitz19-Jan-24 13:24 
GeneralRe: user data system for a web-based e-mail service Pin
trønderen19-Jan-24 14:31
trønderen19-Jan-24 14:31 
PraiseRe: user data system for a web-based e-mail service Pin
Eddy Vluggen10-Feb-24 10:12
professionalEddy Vluggen10-Feb-24 10:12 
AnswerRe: user data system for a web-based e-mail service Pin
Richard Deeming29-Jan-24 4:03
mveRichard Deeming29-Jan-24 4:03 
GeneralRe: user data system for a web-based e-mail service Pin
Eddy Vluggen10-Feb-24 10:14
professionalEddy Vluggen10-Feb-24 10:14 
QuestionSilly Logging Question Pin
Kevin Marois27-Dec-23 17:05
professionalKevin Marois27-Dec-23 17:05 
AnswerRe: Silly Logging Question Pin
Mircea Neacsu27-Dec-23 17:32
Mircea Neacsu27-Dec-23 17:32 
AnswerRe: Silly Logging Question Pin
jschell28-Dec-23 6:25
jschell28-Dec-23 6:25 
The reality is that first, regardless of logging library, this is never clear in terms of practical programming.

Additionally keep in mind that a potential exists that different logging levels might impact execution flow.

There are three usage scenarios
- Production
- QA
- Developer

Some would claim that Error/Warn is only appropriate for Production. That however is simplistic and it will not work in non-trivial situations.

That is because for larger systems debugging production problems often requires looking at execution flow. So logging that represents the successful execution of code (trace logging.)

A perfect example of this is a job system or microservice (ms). In production the question will come up as to 'why' the job/request is not being handled. With logging one can see that the job/ms is actually running. Not just a specific requests, but all requests.

Then trace logging shows or doesn't show that a specific request was handled. And how it was handled.

Trace logging would use a log level of 'Info'. So Prod would use Error/Warn/Info.

The claim would (and will) be made that the log level 'Debug' allows one to turn something on in production for more information. But often that doesn't matter because the failure occurred yesterday, so attempting to figure it out today with more logging is seldom going to help.

The 'Debug' level is often used by developers because of this. But developers often do silly things like log only the index of a for variable. So no context just the value. Which makes sense when they are figuring out a problem but will make no sense and likely add a LOT of noise if you really do turn on 'Debug' in production.

Because of that then one must do code reviews to insure at least that Debug logging provides a context and does not cause significant (useless) noise.

All of that then comes back to QA. What should they run? If you actually want to allow Debug logging and it will be turned on in production then you then need to test both with it on and with it off. So testing twice. Both to insure there is not too much noise and that it does not interfere with functionality.

Due to all of that for me I limit all code check ins to Error/Warn/Info. And in practice I haven't even used Warn for a very long time.


Kevin Marois wrote:
Exception logging I get, but is this how you would Info and Debug?


Pseudo code for a trace log entry.

Log.Info("CreateRequest: RequestId=<id> AssetId=<assetId> Result=<resultCode>");


And should you log an exception for Info? Yes.

As one example because the exception occurs at a non-critical place. For example if you are collecting metrics in a database like how long an operation took, you do NOT stop the execution flow if there is a database error. But you probably do want to log it.

Kevin Marois wrote:
Can someone shed some light?


Also understand that developers and only developers are the target for logging.

There will be requests that Operations, Product Support (customer service) and/or QA 'need' to use it.

If so then those are product requirements. Those people need to create tickets (stories/epics) to specify exactly what they need.

And then QA needs to verify it.

You might or might not use your standard logging for this.

You might also get request from Customers. Such as 'Audit Logging' or 'User login logging'. Those are NEVER implemented using the logging system. Rather it is implemented solely and completely within the product just like any other feature.
QuestionImplementing domain driven design Pin
Jan Hein de Jong23-Dec-23 10:41
Jan Hein de Jong23-Dec-23 10:41 
AnswerRe: Implementing domain driven design Pin
Gerry Schmitz24-Dec-23 6:34
mveGerry Schmitz24-Dec-23 6:34 
GeneralWhy I don't do MVVM. Pin
Gerry Schmitz22-Dec-23 9:46
mveGerry Schmitz22-Dec-23 9:46 
GeneralRe: Why I don't do MVVM. Pin
Greg Utas22-Dec-23 14:46
professionalGreg Utas22-Dec-23 14:46 
GeneralRe: Why I don't do MVVM. Pin
jschell25-Dec-23 7:53
jschell25-Dec-23 7:53 
GeneralRe: Why I don't do MVVM. Pin
Greg Utas25-Dec-23 8:28
professionalGreg Utas25-Dec-23 8:28 
GeneralRe: Why I don't do MVVM. Pin
Dave Kreskowiak22-Dec-23 15:24
mveDave Kreskowiak22-Dec-23 15:24 
GeneralRe: Why I don't do MVVM. Pin
Gerry Schmitz23-Dec-23 7:30
mveGerry Schmitz23-Dec-23 7:30 
GeneralRe: Why I don't do MVVM. Pin
jschell25-Dec-23 7:55
jschell25-Dec-23 7:55 
GeneralRe: Why I don't do MVVM. Pin
Gerry Schmitz25-Dec-23 11:35
mveGerry Schmitz25-Dec-23 11:35 
GeneralRe: Why I don't do MVVM. Pin
jschell26-Dec-23 4:37
jschell26-Dec-23 4:37 
GeneralRe: Why I don't do MVVM. Pin
Gerry Schmitz26-Dec-23 7:03
mveGerry Schmitz26-Dec-23 7:03 
GeneralRe: Why I don't do MVVM. Pin
jschell27-Dec-23 5:19
jschell27-Dec-23 5:19 
QuestionLiterature on designing and implementing an access control system Pin
D4rkTrick8-Dec-23 2:17
professionalD4rkTrick8-Dec-23 2:17 
AnswerRe: Literature on designing and implementing an access control system Pin
Richard MacCutchan8-Dec-23 2:52
mveRichard MacCutchan8-Dec-23 2:52 
GeneralRe: Literature on designing and implementing an access control system Pin
D4rkTrick9-Dec-23 4:52
professionalD4rkTrick9-Dec-23 4:52 
GeneralRe: Literature on designing and implementing an access control system Pin
Richard MacCutchan9-Dec-23 5:05
mveRichard MacCutchan9-Dec-23 5:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.