Logs
Logs can be used to store pretty much anything to your interface. Let’s create our first log.
Logs appear as rows in tables, and fields appear as columns
Logging Contexts
If you want to incrementally update the same log (row),
then you can use with unify.Log():
to create a logging context, and all calls to unify.log
will then update this existing log.
These can also be arbitrarily nested. Note that the most recently created log is always shown at the top of the table (not most recently updated).
We can also pass arguments, which will also be part of the same log.
Using with unify.Log()
is the best practice, as this avoids the need to pass explicit log handles throughout your program.
This code uses explicit handles (each function has a log
argument):
This code logs the same data, but avoids the need to pass the Log
instance around:
Both result in the same log: