DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Where to implement error logging?

I'm starting work on a new project and the customer would like to use the DQMH. The examples are good, but I'm having a little trouble conceptualizing where I should put my error logging at. Should I create a new singleton module that wraps my error logger and give it a Request that allows every other modules to register their error events with it? That seems the most DQMH-ish way of doing things.

 

Any other suggestions?

0 Kudos
Message 1 of 3
(3,292 Views)

You could also do it the other way around and register the Status and Error Broadcast Events of your DQMH modules with your error logger. We make heavy use of the broadcast events and register for them in different places: List of events displayed in GUI, logging to disk, centralized error handling...

 

On our real-time applications, we register for them directly in our main.vi to update the Linux Embedded UI. On Windows, it would rather be our UserInterface DQMH module that displays them.

 

I'm also interested in hearing others' opinions.




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


Message 2 of 3
(3,263 Views)

Hi Ian,

 

I agree with Joerg's approach.

 

You can make your top level Module or VI that launches all your DQMH modules register for the Status Updated and the Error Reported broadcast events of all your modules. From there, you can decide if you log to file directly there or If you create a separate Error Logger DQMH module that would itself register for all of the Error Reported Broadcast events.

 

One of the beauties of custom Events is that if you decide you don't want to log errors, you just don't start that error logger and that is it no problem. 

 

Your idea of creating a specific DQMH module that has a request to log errors is not bad either. You could then have different requests for different types of logging (high priority errors, show stoppers, etc). However I prefer to take advantage of the Error Reported broadcast.

 

I am also curious to see what others have done.

 

Keep us posted on your progress on this project and please thank your customer for trusting DQMH and wanting to use it 🙂 

 

Regards,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
0 Kudos
Message 3 of 3
(3,245 Views)