Fortinet white logo
Fortinet white logo

CLI Reference

log traffic-log

log traffic-log

Use this command to have the FortiWeb appliance record traffic log messages on its local disk. This command also lets you save packet payloads with the traffic logs.

You must enable disk log storage and select log severity levels using log disk before any traffic logs are stored on disk.

Packet payloads supplement the log message by providing the actual data associated with the traffic log, which may help you to analyze traffic patterns.

You can view packet payloads in the Packet Log column when viewing a traffic logs using the web UI. For details, see the FortiWeb Administration Guide:

http://docs.fortinet.com/fortiweb/admin-guides

To use this command, your administrator account’s access control profile must have either w or rw permission to the loggrp area. For details, see Permissions.

Syntax

config log traffic-log

set packet-log {enable | disable}

set status {enable | disable}

end

Variable Description Default

status {enable | disable}

Enable to record traffic log messages if disk log storage is enabled, and the logs meet or exceed the severity levels selected using log disk. disable

packet-log {enable | disable}

Enable to keep packet payloads stored with their associated traffic log message.

For details about obscuring sensitive information in packet payloads, see log sensitive.

disable

message-event {enable | disable}

disable

Example

This example enables disk log storage, sets information as the minimum severity level that a log message must achieve for storage, enables recording of traffic logs and retention of all packet payloads along with the traffic logs.

config log disk

set status enable

set severity information

end

config log traffic-log

set status enable

set packet-log enable

end

Related topics

log traffic-log

log traffic-log

Use this command to have the FortiWeb appliance record traffic log messages on its local disk. This command also lets you save packet payloads with the traffic logs.

You must enable disk log storage and select log severity levels using log disk before any traffic logs are stored on disk.

Packet payloads supplement the log message by providing the actual data associated with the traffic log, which may help you to analyze traffic patterns.

You can view packet payloads in the Packet Log column when viewing a traffic logs using the web UI. For details, see the FortiWeb Administration Guide:

http://docs.fortinet.com/fortiweb/admin-guides

To use this command, your administrator account’s access control profile must have either w or rw permission to the loggrp area. For details, see Permissions.

Syntax

config log traffic-log

set packet-log {enable | disable}

set status {enable | disable}

end

Variable Description Default

status {enable | disable}

Enable to record traffic log messages if disk log storage is enabled, and the logs meet or exceed the severity levels selected using log disk. disable

packet-log {enable | disable}

Enable to keep packet payloads stored with their associated traffic log message.

For details about obscuring sensitive information in packet payloads, see log sensitive.

disable

message-event {enable | disable}

disable

Example

This example enables disk log storage, sets information as the minimum severity level that a log message must achieve for storage, enables recording of traffic logs and retention of all packet payloads along with the traffic logs.

config log disk

set status enable

set severity information

end

config log traffic-log

set status enable

set packet-log enable

end

Related topics