Fortinet black logo

CLI Reference

log setting local

log setting local

Use this command to configure storing log messages to the local hard disk.

Syntax

config log setting local

set antispam-log-status {enable | disable}

set antivirus-log-status {enable | disable}

set disk-full {overwrite | nolog}

set encryption-log-status {enable | disable}

set event-log-category {admin configuration ha | imap pop3 smtp system update webmail}

set event-log-status {enable | disable}

set history-log-status {enable | disable}

set loglevel {alert | critical | debug | emergency | error | information | notification | warning}

set retention-period <days>

set rotation-hour <hour_int>

set rotation-period <days_int>

set rotation-size <file-size_int>

set status {enable | disable}

set sysevent-log-category {admin | configuration | dns | ha | system | update}

set system-event-log-status

end

Variable

Description

Default

antispam-log-status {enable | disable}

Enable to log all antispam events.

enable

antivirus-log-status {enable | disable}

Enable to log all antivirus events.

enable

disk-full {overwrite | nolog}

Enter the action the FortiMail unit will perform when the local disk is full and a new log message is caused.

overwrite: Delete the oldest log file in order to free disk space, and store the new log message.

nolog: Discard the new log message.

overwrite

encryption-log-status {enable | disable}

Enable to log all IBE events.

enable

event-log-category {admin configuration ha | imap pop3 smtp system update webmail}

Type all of the log types and subtypes that you want to record to this storage location. Separate each type with a space.

admin: Log all administrative events, such as logins, resets, and configuration updates.

configuration: Enable to log configuration changes.

ha: Log all high availability (HA) activity.

imap: Log all IMAP events.

pop3: Log all POP3 events.

smtp: Log all SMTP relay or proxy events.

system: Log all system-related events, such as rebooting the FortiMail unit.

update: Log both successful and unsuccessful attempts to download FortiGuard updates.

webmail: Log all FortiMail webmail events.

webmail smtp

event-log-status {enable | disable}

Enable or disable event logging to the local hard disk.

enable

history-log-status {enable | disable}

Enable to log both successful and unsuccessful attempts by the built-in MTA or proxies to deliver email.

enable

loglevel {alert | critical | debug | emergency | error | information | notification | warning}

Type one of the following severity levels:

  • emergency
  • alert
  • critical
  • error
  • warning
  • notification
  • information
  • debug

This log destination will receive log messages greater than or equal to this severity level.

information

retention-period <days>

Specify how long to keep the logs. Valid rang is 1 to 1461 days. Default value is 0, which means no limit.

0

rotation-hour <hour_int>

Enter the hour of the day when the rotation should start.

0

rotation-period <days_int>

Enter the maximum age of the current log file in days.

When the log file reaches either the maximum size or age, the log file is rolled (that is, the current log file is saved to a file with a new name, and a new log file is started).

10

rotation-size <file-size_int>

Enter the maximum size of the current log file in megabytes (MB). The valid range is between 1 to 500.

When the log file reaches either the maximum size or age, the log file is rolled (that is, the current log file is saved to a file with a new name, and a new log file is started).

100

status {enable | disable}

Enable to send log types which are enabled to the local hard disk.

enable

sysevent-log-category {admin | configuration | dns | ha | system | update}

Enter the system event log category to log.

configuration admin system ha update dns

system-event-log-status

Enable to log system events.

disable

Related topics

log setting remote

log alertemail recipient

log alertemail setting

log setting local

log setting local

Use this command to configure storing log messages to the local hard disk.

Syntax

config log setting local

set antispam-log-status {enable | disable}

set antivirus-log-status {enable | disable}

set disk-full {overwrite | nolog}

set encryption-log-status {enable | disable}

set event-log-category {admin configuration ha | imap pop3 smtp system update webmail}

set event-log-status {enable | disable}

set history-log-status {enable | disable}

set loglevel {alert | critical | debug | emergency | error | information | notification | warning}

set retention-period <days>

set rotation-hour <hour_int>

set rotation-period <days_int>

set rotation-size <file-size_int>

set status {enable | disable}

set sysevent-log-category {admin | configuration | dns | ha | system | update}

set system-event-log-status

end

Variable

Description

Default

antispam-log-status {enable | disable}

Enable to log all antispam events.

enable

antivirus-log-status {enable | disable}

Enable to log all antivirus events.

enable

disk-full {overwrite | nolog}

Enter the action the FortiMail unit will perform when the local disk is full and a new log message is caused.

overwrite: Delete the oldest log file in order to free disk space, and store the new log message.

nolog: Discard the new log message.

overwrite

encryption-log-status {enable | disable}

Enable to log all IBE events.

enable

event-log-category {admin configuration ha | imap pop3 smtp system update webmail}

Type all of the log types and subtypes that you want to record to this storage location. Separate each type with a space.

admin: Log all administrative events, such as logins, resets, and configuration updates.

configuration: Enable to log configuration changes.

ha: Log all high availability (HA) activity.

imap: Log all IMAP events.

pop3: Log all POP3 events.

smtp: Log all SMTP relay or proxy events.

system: Log all system-related events, such as rebooting the FortiMail unit.

update: Log both successful and unsuccessful attempts to download FortiGuard updates.

webmail: Log all FortiMail webmail events.

webmail smtp

event-log-status {enable | disable}

Enable or disable event logging to the local hard disk.

enable

history-log-status {enable | disable}

Enable to log both successful and unsuccessful attempts by the built-in MTA or proxies to deliver email.

enable

loglevel {alert | critical | debug | emergency | error | information | notification | warning}

Type one of the following severity levels:

  • emergency
  • alert
  • critical
  • error
  • warning
  • notification
  • information
  • debug

This log destination will receive log messages greater than or equal to this severity level.

information

retention-period <days>

Specify how long to keep the logs. Valid rang is 1 to 1461 days. Default value is 0, which means no limit.

0

rotation-hour <hour_int>

Enter the hour of the day when the rotation should start.

0

rotation-period <days_int>

Enter the maximum age of the current log file in days.

When the log file reaches either the maximum size or age, the log file is rolled (that is, the current log file is saved to a file with a new name, and a new log file is started).

10

rotation-size <file-size_int>

Enter the maximum size of the current log file in megabytes (MB). The valid range is between 1 to 500.

When the log file reaches either the maximum size or age, the log file is rolled (that is, the current log file is saved to a file with a new name, and a new log file is started).

100

status {enable | disable}

Enable to send log types which are enabled to the local hard disk.

enable

sysevent-log-category {admin | configuration | dns | ha | system | update}

Enter the system event log category to log.

configuration admin system ha update dns

system-event-log-status

Enable to log system events.

disable

Related topics

log setting remote

log alertemail recipient

log alertemail setting