No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - Device Management

S9300, S9300E, and S9300X V200R012C00

This document describes the configurations of Device Management, including device status query, hardware management, CSS, SVF, PoE, OPS, OIDS, energy-saving management, information center, fault management, NTP, synchronous ethernet, PTP.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Recording Log

Recording Log

Interface Name

Recording log

Application Phase

Subscription and execution phases

API Prototype

result1_value, result2_description = ops.syslog(content, severity="informational", logtype="syslog")

Description

Parameter

Description

Value

content

Indicates log contents.

The value is a string of 0 to 512 case-sensitive characters.

severity

Indicates the log severity.

The value is of the enumerated type:

  • critical: indicates a major error.

  • error: indicates an error.

  • warning: indicates a potential error.

  • informational: indicates an informational message.

logtype

Indicates the log type.

The value is syslog, indicating a user log.

Return Value

The result1_value and result2_description in the API prototype indicate return values.

The result1_value is the first return value, 0 indicates success, and 1 indicates failure.

The result2_description is the second return value, indicating the failure cause. It is returned only when the first return value is 1.

Usage Description

This API records user logs. The logs can be registered logs on the device or user-defined logs.

Example

When a subscription event is matched, you can record user-defined logs.

value, descri_str = ops.syslog("Some packets are dropped by traffic policy.", "warning", "syslog")
Translation
Download
Updated: 2018-09-03

Document ID: EDOC1100038289

Views: 42026

Downloads: 15

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next