Code instrumentation in haskell -


Suppose that I keep complex applications connected to external systems. One day it starts returning unexpected results for some input and I have to figure out why it can be problematic of DNS problems, file system related problems, external system changes, anything can happen.

Considering that the amount of processing is very extensive, before I can identify potential locations of the problem, I do not produce it.

How can I write the current code so that I can provide non-volatile proof (no debug session) (for example) which is a bug in some component or function.

It looks like a question of architecture / best practices, compared to some of Haskell's specifications, Unless I am doing something wrong,

It seems that your application needs to use the logging system, such as The general approach is to create logging messages with the attached priority for each component of your code. After this you can handle the app different priority levels differently, so for example important errors can be displayed on the console, while debug and notification-level errors go to the logfile.

This sometimes delivers .trace.TasEvent and debug.trace.tasAventory instead of the logging system, especially if you suspect a concurrency problem Because ghc eventlog also logs information about thread spawn / switching and garbage collection. But in general it is not the replacement of a real logging framework.

In addition, you may want to use the assure as a sensitive test that the "impossible" conditions are not really.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -