quote start Great work, brush options works as a charm quote end
-Cristiano

Log with automatic methods and args traceback

Content

Another powerful debugging tool is to log every user and internal action, in Python we usually use the logging module, but again Nathive aims to make all easier to developers, so with the Nathive log system every method called is tracked, and the arguments too, and in addition the entries are nested, so is easy to follow the execution flow.

These are some lines from a real log (slide-8a): Each line are composed by a memory address, object and method, and its argument values. As you can see it's clear how the application is working.

But the better feature of this log system is that you does not need to modify the code to use it, it's (slide-8b) automagical.

How it works? (slide-8c) when you allow some object to use the log system calling main.log.allow_tracking(object), the system automatically decorates every method in the object with a middle code that tracks all the data and sends it to the log file, then the method is executed as normally.

So, now we have a detailed log and we can check for example if some method or group of methods are doing stupid loop, or if one arguments are lost or wrong or whatever.

Previous page | Next page