zlogcoverage
zlogcoverage
MODE

The zlogcoverage statement allows instrumentation coverage to be turned on or off within a procedure.

Parameters

This statement has one parameter:

mode – instrumentation coverage mode, may be “always”, “never” or “normal” (empty text is treated as “normal”).

Description

This statement allows instrumentation coverage to be turned on or off within a procedure. Usually coverage is enabled or disabled in the Instrumentation panel (see Debug Instrumentation), but this statement allows this to be done in the program itself.

    zlog "This will appear if coverage is enabled in Instrumentation panel."
    zlogcoverage "always"
    zlog "This will always appear."
    zlogcoverage "never"
    zlog "This will never appear."
    zlogcoverage "normal"
    zlog "Again, this will appear if coverage for this procedure is enabled in Instrumentation panel."

Note that coverage is only enabled for this exact procedure, not for any subroutines called by this procedure.

One application for this statement is to enable log coverage for a web publishing procedure, where it might be inconvenient to use the Instrumentation panel to enable log coverage on the server. Instead you can use the zlogcoverage statement to enable coverage, uploading the procedure with this statement included. (Of course you’ll still need to access the server computer to view the log.) When you are done, remove the zlogcoverage statement, or change the statement to `zlogcoverage "normal"`, and upload to the server again.

See Also

- Client/Server Debug Instrumentation -- using instrumentation with Panorama X server and clients.
- Debug Instrumentation -- conditional logging of the internal state of Panorama program code.
- info("runningunderterminal") -- returns true if Panorama was launched under Terminal.app.
- labelize( -- returns the value of a field or variable along with a label. This saves typing when you need to display fields or variables when logging and debugging.
- labelizeformula( -- returns the value of a formula along with the formula itself as a label.
- labelizeinfo( -- returns the value of an info( function, along with the function itself as a label.
- labelizepattern( -- formats a text value using a label and a pattern.
- zlog -- outputs a message to the instrumentation log (if instrumentation is enabled).
- zlogalways -- unconditionally outputs a message to the instrumentation log.
- zlogdictionary -- outputs a data dictionary to the instrumentation log (if instrumentation is enabled).
- zlogging( -- returns true if zlogging is enabled for the current database and procedure, otherwise false.

History

Version | Status | Notes
10.2 | New | New in this version.