LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Logging for client / server framework

Solved!
Go to solution

I’m currently struggling with some serious error handling/logging issues. The scenario is: I’m building a server / client framework with different packages for the clients. At the server side, there are all packages located which are dynamically loaded when the client asks for it (for grabbing some data/ central data processing / etc.).

Everything is fine so far. The packages are organized as LVLIBPS with a defined Interface LVLIBP which all have in common. Let’s call the shared LVLIBP the Interface.lvlibp. The Interface includes e.g. the error management, some common shared things, like some parts of the framework I’m using, some data management, etc.

At the server side the libraries are called with the help of the Delacor Queued Message Handler. Later on a few 10s of these shared libraries are running in parallel with the shared Interface.lvlibp. If one VI causes an error it is calling LogError.vi inside the Interface.lvlibp. To obtain some additional information about the error (logged in user / clientID which requested function / calling LVLIBP) I have to call a VI of the corresponding class which is dynamically dispatched from the Interface.lvlibp.

Does anybody has any idea how to realize such a scenario without distributing the class wires inside each location where the LogError.vi is called?

 

Thanks in advance

0 Kudos
Message 1 of 5
(2,643 Views)

Use an abstract message class that would contain the error and related data. Send that to your error logger. Another method would be to create helper classes which could be used to get that information.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 2 of 5
(2,628 Views)

Do you have any recommendations for a good example?

0 Kudos
Message 3 of 5
(2,605 Views)
Solution
Accepted by topic author aptivo

The actor framework is a good example of a generic definition of a message class that is used in the framework and then given concrete definitions for the actors as they are created. You do not have to use the actor framework for your application but it does provide an example of how this can be done.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 5
(2,577 Views)

Thanks for the answer. 

I already thought about the actor framework inside my application. I’ve used a similar solution via queues. Each plugin has its own queue which sends the errors to a main queue which is sending the data to the log client. So therefore I can distinguish between the plugins which are causing the errors.

0 Kudos
Message 5 of 5
(2,546 Views)