This week I worked on rsyslog research and management. The work on terraform-provider-ucloud is postponed.
rsyslog
Use template in output action
$template PJL_Format,"%timegenerated%|%HOSTNAME%|%syslogtag%|%msg%\n" $template PJL_File,"/tmp/local-%programname%.log" local6,local7.* ?PJL_File;PJL_Format
Use tag to filter log. Facilities are fixed and cannot add new custom facility, but app can specify arbitrary tag. The tag format is
programname[PROCID]
Syslog::Logger
in Ruby reserves higher priorities (crit, alert and emerge) for system message. The mapping to Logger severity is one level lower:- Ruby -> syslog
- debug -> debug
- info -> info
- warn -> notice
- error -> warning
- fatal -> err
Ruby 2.0 cannot specify facility when creating
Syslog::Logger
, 2.2 has the third parameter to specify the facility.20.2. Basic Configuration of Rsyslog via Redhat
Game
Management
- Why you should argue with your employees 适当的争吵
- 出口就容易伤人?试试“三明治法则”吧! 表扬,批评,期望
Misc
- Moving away from puppet: SaltStack or Ansible? | Ryan D Lane Comparison between SaltStack and Ansible. The author prefers SaltStack.
- Need to specify
--with-opt-dir
on OSX 10.11 El Capitan. · Issue #718 · puma/puma Bundle can configure build options for specific gem:bundle config build.puma --with-opt-dir=/usr/local/opt/openssl
- tencent/libco. Coroutine for C, from WeChat team.