libwd/0017-uadk-the-description-document-of-the-uadk-log-is-add.patch
2023-05-26 16:41:41 +08:00

56 lines
2.1 KiB
Diff

From c2ae0f385c036f05436902aebe4df205be884c34 Mon Sep 17 00:00:00 2001
From: Kai Ye <yekai13@huawei.com>
Date: Wed, 15 Mar 2023 16:07:19 +0800
Subject: [PATCH 17/28] uadk - the description document of the uadk log is
added
The document file describes how to set up a uadk log.
Signed-off-by: Kai Ye <yekai13@huawei.com>
---
docs/log.rst | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 docs/log.rst
diff --git a/docs/log.rst b/docs/log.rst
new file mode 100644
index 0000000..5e36591
--- /dev/null
+++ b/docs/log.rst
@@ -0,0 +1,32 @@
+
+The rsyslog.conf file is the main configuration file for the rsyslogd which logs system
+messages on systems. The uadk library can set up the log level and log file by use the rsyslogd.
+the uadk log can be printed in message or syslog file default. You can set your own uadk.log
+file in rsyslog.conf.
+
+1. If selected the static compilation, the syslog will not be used, The information will be printed
+ on the serial port.
+2. If not edited the rsyslog.conf, the log files will be printed in /var/log/messages.
+3. If you don't want to use the rsyslogd, you can edit the Makefile.am. The information will be
+ printed on the serial port.
+4. If you want to use the rsyslogd, you can see the following information.
+
+The uadk supports four setting commands, the log level parameters:
+ local5.err # display the error conditions
+ local5.info # display the warning and error conditions
+ local5.debug # display the debug,warning,error conditions
+ local5.* # print levels are not differentiated.
+
+The following steps will help you set up the syslog file:
+
+step 1:
+ Add the following information to the last line of /etc/rsyslog.conf:
+ local5.err /var/log/uadk.log
+
+step 2:
+ Restart the rsyslog daemon service. The cmd is:
+ service rsyslog restart
+
+After you run the tasks. You can see the uadk.log in /var/log/uadk/log. If you want to clear the
+log file, you can use the following cmd: echo 0 > /var/log/uadk.log.
+
--
2.25.1