Skip to content

$ZAUditlog

$ZAUditlog

Sends its argument to an audit logger/listener process. This function requires setting the AZA_ENABLE audit logging facility in the $gtm_dist/restrict.txt file. For information on setting up the AZA_ENABLE audit logging facility, refer to “Configuring the Restriction Facility” section in the GT.M Administration and Operations Guide.The format for the $ZAUDITLOG() function is:

ZAUDITLOG(expr)
  • expr specifies the string to send for audit logging
  • A return of TRUE (1) indicates successful logging, FALSE (0) indicates logging is not enabled; a trappable RESTRICTEDOP error indicates logging is enabled but not working.
  • $ZAUDITLOG() identifies its message with src=4, and like other GT.M logging facilities, records the location of GT.M distribution, uid, euid, pid, tty, and the command / argument(s).
  • If LGDE is specified as an option for the AZA_ENABLE facility, GDE logs all commands. GT.M ignores this option if specified with other A*_ENABLE audit logging facilities. When it fails to log a command, GDE issues a GDELOGFAIL error. The following table characterizes $ZAUDITLOG() and GDE audit logging behavior:
    $ZAUDITLOG() / GDE logging Characteristics
    AZA_ENABLELGDELogging successGDE audit logging$ZAUDITLOG() result
    YesYesYesYes1
    YesNoYesNo1
    YesYesNoGDELOGFAIL errorRESTRICTEDOP error
    YesNoNoNoRESTRICTEDOP error
    NoN/AN/ANo0

Examples of $ZAUDitlog()

Example:

GTM>write $zauditlog("Name Change for "_ip)
1
GTM>

This example uses $ZAUDITLOG() to log a literal label concatenated with a variable (identifier). The return indicates the logging was successful.