Open ilyash-b opened 3 years ago
Maybe: log("Processing file X", ??? log("processing line Y") ???)
, where ???
stands for undecided syntax
Maybe without introducing new syntax:
log("reading file X", F(log) {
# Nested:
log("reading line 1")
...
})
This can automatically add "start" and "end" for the section. Maybe also let know about exception if it occurs in the callback. Sample output:
... reading file X - start
...
... [reading file X] reading line 1
...
... reading file X - end
Likely, debug()
and other functions need similar functionality, maybe a generic facility should be developed.
TODO: Think about integration with different facilities and methods, similar to $(log: ....)
Requirements