Fortinet white logo
Fortinet white logo

Script Reference Guide

Debug(str)

Debug(str)

Prints the debug information when the virtual server is using stream scripting.

Syntax

debug(str)

Arguments

Name Description

str

A string which will be printed.

Events

Applicable in all events.

Example

when STREAM_RESPONSE_DATA { 
    local cip=IP:client_addr() 
    local lip=IP:local_addr() 
    local rip=IP:remote_addr() 
    local cp=IP:client_port() 
    local lp=IP:local_port() 
    local rp=IP:remote_port() 
    local cipv=IP:client_ip_ver() 
    
    local sip=IP:server_addr() 
    local sp=IP:server_port() 
    local sipv=IP:server_ip_ver() 

    debug("resp: remote %s:%s, client %s:%s, local %s:%s, cip version %s\n", rip, rp, cip, cp, lip, lp, cipv) 
    debug("resp: server %s:%s, sip version %s\n", sip, sp, sipv) 
    log("resp: remote %s:%s, client %s:%s, local %s:%s, cip version %s", rip, rp, cip, cp, lip, lp, cipv) 
    log("resp: server %s:%s, sip version %s", sip, sp, sipv) 
} 

Supported Version

FortiADC version 6.1.1 and later.

Debug(str)

Debug(str)

Prints the debug information when the virtual server is using stream scripting.

Syntax

debug(str)

Arguments

Name Description

str

A string which will be printed.

Events

Applicable in all events.

Example

when STREAM_RESPONSE_DATA { 
    local cip=IP:client_addr() 
    local lip=IP:local_addr() 
    local rip=IP:remote_addr() 
    local cp=IP:client_port() 
    local lp=IP:local_port() 
    local rp=IP:remote_port() 
    local cipv=IP:client_ip_ver() 
    
    local sip=IP:server_addr() 
    local sp=IP:server_port() 
    local sipv=IP:server_ip_ver() 

    debug("resp: remote %s:%s, client %s:%s, local %s:%s, cip version %s\n", rip, rp, cip, cp, lip, lp, cipv) 
    debug("resp: server %s:%s, sip version %s\n", sip, sp, sipv) 
    log("resp: remote %s:%s, client %s:%s, local %s:%s, cip version %s", rip, rp, cip, cp, lip, lp, cipv) 
    log("resp: server %s:%s, sip version %s", sip, sp, sipv) 
} 

Supported Version

FortiADC version 6.1.1 and later.