# SYSLOG

### 1. Function Overview

This product provides the SYSLOG functions shown below as a means to ascertain the operating state.

1. Functions to collect, reference, and delete the log that is accumulated inside this product

2. Functions for output to the TELNET console simultaneously with logging

3. Functions for transmitting to a previously-registered notification destination (SYSLOG server) simultaneously with logging

Logging, output to the TELNET console, and notifications to the SYSLOG server are performed according to the output level specified by the user. Processing occurs only for the permitted messages.
Logging occurs in RAM, and is automatically backed up to flash ROM or can be backed up manually.
Notifications to the SYSLOG server are done simultaneously with logging, but only if a SYSLOG server has been registered.

### 2. Definition of Terms Used

None

### 3. Function Details

The SYSLOG function is described below.

1. Logging occurs in RAM, and can accumulate up to 1500 items.
   The following three methods for backing up to a flash ROM are available.

   - Automatic backup performed every hour since system boot

   - Manual backup performed by the save logging command

   - Automatic backup for system restart that occurs due to reload command or firmware update

2. The logs accumulated in RAM can be viewed by the show logging command.
   The RAM and flash ROM logs can be deleted using the clear logging command.
   The log information in RAM will not be deleted by execution of a backup.
   In addition, the logs backed up in the flash ROM are expanded into RAM when the system is started.
   Therefore, even if the system is restarted using the reload command or firmware update, new logs will be accumulated as continuation of the logs at the previous startup.

3. Log transmission occurs only if the notification destination (SYSLOG server) has been registered.
   You can use the logging host command to register up to two notification destinations.
   Specify the notification destination either by IP address or FQDN.
   As the port number of the notification destination, the default port number 514 is used. (This setting cannot be freely set by the user.)
   The logging format command can be used to change the format of log notifications to not include the header portion (time stamp and host name). The following are log examples.

   - Without the format specified (no logging format)

         <134>Jan  1 00:00:00 Yamaha [     IMI]:inf: Configuration file is saved in "config0"

   - With the format specified (logging format legacy)

         <134>[     IMI]:inf: Configuration file is saved in "config0"

4. The level of log that is transmitted (SYSLOG priority) can be set using the logging trap command.
   This product allows you to enable or disable output for each level of log.
   With the factory settings, the output level enables only Information and Error.

### 4. List of Related Commands

Related commands are indicated below.
For details, refer to the Command Reference.

Function name | Command name
--- | ---
Set log output level | logging trap
Set log output destined to TELNET console | logging stdout
Set log notification destination (SYSLOG server) | logging host
Change the log notification format | logging format
Back up log | save logging
Clear log | clear logging
Show log | show logging

### 5. Examples of Command Settings

1. Enable debug-level log output, and start log output to the SYSLOG server (192.168.1.100).
   Also output informational-level log to the TELNET console.

       Yamaha(config)# logging trap debug (1)
       Yamaha(config)# logging host 192.168.1.100 (2)
       Yamaha(config)# logging stdout info (3)

   1 | Enable the debug-level log output
   2 | Register a SYSLOG server
   3 | Output an informational-level log to the TELNET console

2. Stop notifications to the SYSLOG server.

       Yamaha(config)# no logging host

3. Save and show the accumulated log information.

       Yamaha# save logging (1)
       Yamaha# show logging (2)
       2018/10/05 15:58:47:[    L2MS]:inf: Start L2MS(Agent)
       2018/10/05 15:58:47:[    VLAN]:inf: Interface vlan1 changed state to up
       2018/10/05 15:58:47:[      IF]:inf: Interface port1.4 changed state to up (10-half)
       2018/10/05 15:58:49:[    L2MS]:inf: Start management by manager(00a0.dec9.d6d2)
       2018/10/05 15:59:32:[   DHCPC]:inf: DHCP gets IP address: 192.168.1.9
       2018/10/05 15:59:46:[ SESSION]:inf: Login succeeded as (noname) for TELNET: 192.168.1.6
        :

   1 | Save the log in RAM to ROM
   2 | Show the accumulated logs

4. Clear the accumulated log information.

       Yamaha# clear logging (1)
       Yamaha# show logging (2)
        (3)

   1 | Clear all accumulated logs
   2 | Show the logs
   3 | Nothing is shown because they have been erased

### 6. Points of Caution

None

### 7. Related Documentation

None

Search result
No more search results.
There are no topics that match your search query.