busybox- logger

先看一下

在busybox裡的help說明:

/ # logger –help
BusyBox v1.11.2 (2010-02-01 10:27:34 CST) multi-call binary

Usage: logger [OPTION]… [MESSAGE]

Write MESSAGE to the system log. If MESSAGE is omitted, log stdin.

Options:
-s Log to stderr as well as the system log
-t TAG  Log using the specified tag (defaults to user name)
-p PRIO Priority (numeric or facility.level pair)

使用example:

/ # logger -p 7 -t “YouAreOK” “hello world!!”

這樣就是表示此log的

重要性level為7,

Tag是 “YouAreOK”,

message是 “hello world!!”

LOG顯示如下:
/ # <15>Jan  1 20:04:13 YouAreOK: hello world!!


發表迴響

Copy Protected by Chetan's WP-Copyprotect.