Module: log

Module: log#

Leer en español

  • get log settings

  • set log settings SETTING…

  • unset log settings SETTING…

  • list log archives

  • get log TYPE DOMAIN

cPanel log archival settings are:

  • ‘archive’

  • ‘prune’

If ‘archive’ is set, log files will be archived to your home directory after the system processes statistics.

If ‘prune’ is set, cPanel will remove the previous month’s archived logs at the end of every month.

COMMANDS

get log settings

Get the account’s log archival settings.

Example

$ cpanel get log settings

See a sample of the JSON result data at: https://api.docs.cpanel.net/openapi/cpanel/operation/get_settings/

set log settings SETTING…

Set the account’s log archival settings. SETTING is ‘archive’ or ‘prune’.

Examples

$ cpanel set log settings archive
$ cpanel set log settings prune
$ cpanel set log settings archive prune

unset log settings SETTING…

Unset the account’s log archival settings. SETTING is ‘archive’ or ‘prune’.

Examples

$ cpanel unset log settings archive
$ cpanel unset log settings prune
$ cpanel unset log settings archive prune

list log archives

List the account’s archived log files.

Example

$ cpanel list log archives

See a sample of the JSON result data at: https://api.docs.cpanel.net/openapi/cpanel/operation/list_archives/

get log TYPE DOMAIN

Get error log data for DOMAIN. TYPE is ‘error’ or ‘suexec’ . Use ‘cpanel list domains’ to get a list of valid DOMAINs.

Examples

$ cpanel get log error example.com
$ cpanel get log suexec example.com

See a sample of the JSON result data at: https://api.docs.cpanel.net/openapi/cpanel/operation/get_site_errors/