configure log target format

For console display, session, memory buffer, and NVRAM targets:

configure log target [ console | session | memory-buffer | nvram ] format [timestamp [ seconds | hundredths | none]] [date [ dd-Mmm-yyyy | yyyy-mm-dd | Mmm-dd | mm-dd-yyyy | mm/dd/yyyy | dd-mm-yyyy | none]] {event-name [component | condition | none]} {process-name} {process-slot} {severity} {source-line} {host-name}

For syslog targets:

configure log target syslog [[all | [ipaddress {udp-port udp_port} |ipPort]] {vr vr_name} {local}] format [timestamp [ seconds | hundredths | none]] [date [ dd-Mmm-yyyy | yyyy-mm-dd | Mmm-dd | mm-dd-yyyy | mm/dd/yyyy | dd-mm-yyyy | none]] {event-name [component | condition | none]} {process-slot} {severity} {priority} {host-name} {source-line} {tag-id} {tag-name}

Description

Configures the formats of the displayed message, on a per-target basis.

In a stack, this command is applicable only to Master and Backup nodes and not applicable to the standby nodes.

Syntax Description

console Specifies the console display.
session Specifies the current session (including console display).
memory-buffer Specifies the switch memory buffer.
nvram Specifies the switch NVRAM.
syslog Specifies a syslog target.
all Specifies all remote syslog servers.
ipaddress Specifies the syslog IP address.
ipPort Specifies the UDP port number for the syslog target.
vr_name

Specifies the virtual router that can reach the server IP address.

Note: User-created VRs are supported only on the platforms listed for this feature in the Feature License Requirements document.
local0 ... local7 Specifies the local syslog facility.
timestamp Specifies a timestamp formatted to display seconds, hundredths, or none.
date Specifies a date formatted as specified, or none.
event-name Specifies how detailed the event description will be. Choose from none, component or condition.
host-name Specifies whether to include the syslog host name.
priority Specifies whether to include the priority.
process-name Specifies whether to include the internal process name.
process-slot

Specifies which slot number the message was generated.

Note: This parameter is available only on modular switches.
severity Specifies whether to include the severity.
source-line Specifies whether to include the source file name and line number.
tag-id Specifies whether to include the tag ID.
tag-name Specifies whether to include the tag name.

Default

The following defaults apply to console display, memory buffer, NVRAM, and session targets:

  • timestamp—hundredths
  • date—mm-dd-yyyy
  • event-name—condition
  • process-name—off
  • process-slot—off (modular switches only)
  • severity—on
  • source-line—off
  • host-name—off

The following defaults apply to syslog targets (per RFC 3164):

  • timestamp—seconds
  • date—mmm-dd
  • event-name—none
  • process-slot—off (modular switches only)
  • severity—on
  • priority—on
  • host-name—off
  • source-line—off
  • tag-id—off
  • tag-name—on

If a virtual router is not specified, VR-Mgmt is used.

Usage Guidelines

This command configures the format of the items that make up log messages. You can choose to include or exclude items and set the format for those items, but you cannot vary the order in which the items are assembled.

When applied to the targets console or session, the format specified is used for the messages sent to the console display or telnet session. Configuration changes to the session target, be it either a telnet or console display target session, are in effect only for the duration of the session, and are not saved in FLASH.

When this command is applied to the target memory-buffer, the format specified is used in subsequent show log and upload log commands. The format configured for the internal memory buffer can be overridden by specifying a format on the show log and upload log commands.

When this command is applied to the target syslog, the format specified is used for the messages sent to the specified syslog host.

Timestamps

Timestamps refer to the time an event occurred, and can be output in either seconds as described in RFC 3164 (for example, “13:42:56”), hundredths of a second (for example, “13:42:56.98”), or suppressed altogether. To display timestamps as hh:mm:ss, use the seconds keyword, to display as hh:mm:ss.HH, use the hundredths keyword, or to suppress timestamps altogether, use the none keyword. Timestamps are displayed in hundredths by default.

Date

The date an event occurred can be output as described in RFC 3164. Dates are output in different formats, depending on the keyword chosen. The following lists the date keyword options, and how the date “March 26, 2005” would be output:

  • Mmm-dd—Mar 26
  • mm-dd-yyyy—03/26/2005
  • dd-mm-yyyy—26-03-2005
  • yyyy-mm-dd—2005-03-26
  • dd-Mmm-yyyy—26-Mar-2005

Dates are suppressed altogether by specifying none. Dates are displayed as mm-dd-yyyy by default.

Event Names

Event names can be output as the component name only by specifying event-name component and as component name with condition mnemonic by specifying event-name condition, or suppressed by specifying event-name none. The default setting is event-name condition to specify the complete name of the events.

Host Name

The configured SNMP name of the switch can be output as HOSTNAME described in RFC 3164 by specifying host-name. The default setting is off.

Process Name

For providing detailed information to technical support, the (internal) ExtremeXOS task names of the applications detecting the events can be displayed by specifying process-name. The default setting is off.

Process Slot

For providing detailed information to technical support, the slot from which the logged message was generated can be displayed by specifying process-slot. The default setting is off. This is available only on modular switches.

Severity

A four-letter abbreviation of the severity of the event can be output by specifying severity on or suppressed by specifying severity off. The default setting is severity on. The abbreviations are: Crit, Erro, Warn, Noti, Info, Summ, Verb, and Data. These correspond to: Critical, Error, Warning, Notice, Informational, Debug-Summary, Debug-Verbose, and Debug-Data.

Source Line

For providing detailed information to technical support, the application source file names and line numbers detecting the events can be displayed by specifying source-line. The default setting is off. You must enable debug mode using the enable log debug-mode command to view the source line information. For messages generated prior to enabling debug mode, the source line information is not displayed.

Tag ID

The process-id of the (internal) ExtremeXOS process that generated the event that resulted in the log message can be displayed by specifying tag-id. The default setting is off.

Tag Name

The name of the log component to which the generated event belongs can be displayed by specifying tag-name. The default setting is on. The tag name would be the same as the output of event-name component.

Example

In the following example, the switch generates the identical event from the component SNTP, using three different formats.

Using the default format for the session target, an example log message might appear as:

05/29/2005 12:15:25.00 <Warn:SNTP.RslvSrvrFail> The SNTP server parameter value (TheWrongServer.example.com) can not be resolved.

If you set the current session format using the following command:

configure log target session format timestamp seconds date mm-dd-yyyy event-name component

The same example would appear as:

05/29/2005 12:16:36 <Warn:SNTP> The SNTP server parameter value (TheWrongServer.example.com) can not be resolved.

To provide some detailed information to technical support, you set the current session format using the following command:

configure log target session format timestamp hundredths date mmm-dd event-name condition source-line process-name

The same example would appear as:

May 29 12:17:20.11 SNTP: <Warn:SNTP.RslvSrvrFail> tSntpc: (sntpcLib.c:606) The SNTP server parameter value (TheWrongServer.example.com) can not be resolved.

History

This command was first available in ExtremeXOS 10.1.

The ipPort and host-name parameters were first introduced in ExtremeXOS 11.1.

Platform Availability

This command is available on all platforms.