-
-
Notifications
You must be signed in to change notification settings - Fork 0
introduction
Spies in the Katsa extension is modeled as four distinct calls that can be organized along two different dimensions. They are either doing logging or error reporting, and they are either just giving a notification or a stack trace. It is easy to extend the default behavior through use of callbacks, thus keeping the expected behavior. One typical use is to extend the granularity past the just info logging and error reporting.
The name “katsa” is a field intelligence officer in Mossad, the national intelligence agency of Israel. A katsa collects information and runs agents – spies – like this extension. This extension has software spies that track code execution.
A core example of a module can be found at Module:Test. This example registers four spies, one for each of carp()
, cluck()
, croak()
, and confess()
.
When called they give a resulting output as described by the following. The previous example module and the following wikipages can be loaded by calling composer import
in the Katsa extension directory.
The following line should not give a visible output, it should only give output in the console.
{{#invoke:Test|carp}}
This is
The following line should not give a visible output, it should only give output in the console.
{{#invoke:Test|cluck}}
The following line should give an error message reading “Lua error: Croak called: croak croak croak.”
{{#invoke:Test|croak}}
The following line should give an error message reading “Lua error in Module:Test at line 22: Confess called: confess confess confess.” The line number can change somewhat.
{{#invoke:Test|confess}}