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.
- Coding with Debug Instrumentation -- modifying your code to generate debug instrumentation output.
- Crash Proof Debug Instrumentation Monitoring -- real time crash-proof instrumentation monitoring
- Customizing Debug Instrumentation Coverage -- specifying what code is being debugged at the moment.
- Debug Instrumentation -- conditional logging of the internal state of Panorama program code.
- Debug Instrumentation Log Window -- dynamically monitor debug instrumentation output as your program runs.
- Debug Instrumentation Monitoring using an External Program -- monitoring debug instrumentation with an external program (Terminal.app, BBEdit.app).
- Debug Instrumentation Text File -- configuring and accessing the debug instrumentation log (text) file.
- info("runningunderterminal") -- returns the name of the terminal program if Panorama was launched under one, otherwise it returns empty text.
- 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.
- Recording Code Triggers in Debug Instrumentation -- the code triggers option automatically tracks whenever any code is triggered, whether from a menu, a button, or implicitly (for example when data is entered).
- Recording Control Flow in Debug Instrumentation -- configure debug instrumentation to automatically log when control flow is non-linear, for example a call, return, goto, etc.
- setzlog -- turns instrumentation coverage on or off for a specific procedure (or all procedures within a database).
- 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
10.2 | New | New in this version. |