Hi Dojo,
I'm building some Low Code Apps and need a way to log information for debugging purposes, providing additional information, etc.
Not sure if there already something that I can reuse? If not, I'm eager to build something myself, but I'm looking for some best practices input since I can think of a few approaches to make this available:
- store logging in logger tables (make use of aliases for each application)
- store the data in separate files (like done for the SRM framework)
- make the data for each application individually available in DOM
- create 1 DOM module for logging purposes
Hey Jens,
The best approach really depends on what exactly you want to log. However, in most cases, I personally recommend using logger tables. This helps avoid problems related to files and synchronization. Although using DOM is an option, I think it may be excessive if you're only interested in basic logging.
Hi Jens, this is not full logging, but it can help for debugging custom GQI connectors.
If you try/catch the errors in your code, you can throw a "GenIfException". This will then be visualized in the app visualization, e.g. a table. It's not very clean to use this in production code as the errors will be visible to the user, but it can help while debugging.
try
{
//some code to retrieve or process data goes here
}
catch (Exception e)
{
throw new GenIfException($"failed to fetch/process data from source: {e}");
}
Jens,
What is done in SRM has few drawbacks, due to the fact that it requires a shared folder accessible from all DMAs of a cluster.
There is also a LogHelper API available (RN26434) ; however there is no UI to visualize log records. You could of course implement an ad-hoc data source to retrieve them.
Hi Michiel, I’m more looking for a way to store this error logging so that someone can have a look later. I can always show it by using an IAS, but if the user forgets to make a capture of it the logging is lost.