Skip to main content
btey
Staff & Editor
Staff & Editor
Aug 25, 2022 5:24 AM UTC

Technical Tip: Customize log test detail

Description

This article describe the method to generate log test from FortiGate.

 

The log test is useful to verify the logging status.

Customize log test detail could allow the user to generate the description for log identification.

Scope FortiGate log.
Solution

CLI command:

 

# diagnose log test-text <log-id> <level> <text-log> [<repeat>]

 

Sample:

 

# diagnose log test-text "0100020014" "critical" "" 5

 

Output:

 

LogTest_1.PNG

 

Customize the log description, source IP, policy ID field and etc as below:

 

# diagnose log test-text "0100020014" "critical" "policyid=999 sessionid=99999 srcip=192.168.1.1 srcport=59999 logdesc=\"For log test only\"" 5

Output:

 

LogTest_2.PNG

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024