rsyslog ~ 波浪号
<pre name="code" class="html">Using negation can be useful if you would like to do some generic processing but exclude some specific events. You can use the discard action in conjunction with that. A sample would be: *.* /var/log/allmsgs-including-informational.log
:msg, contains, "informational" ~
*.* /var/log/allmsgs-but-informational.log
Do not overlook the tilde in line 2! In this sample, all messages are written to the file allmsgs-including-informational.log. Then, all messages containing the string “informational” are discarded. That means the config file lines below the “discard line” (number 2 in our sample) will not be applied to this message. Then, all remaining lines will also be written to the file allmsgs-but-informational.log. 使用否定是有用的,如果 你想要做一些通用的处理 但是需要排除一些特定的事件,你可以使用discard action 连接它 例子如下: *.* /var/log/allmsgs-including-informational.log
:msg, contains, "informational" ~
*.* /var/log/allmsgs-but-informational.log 不要忽视 波浪号 在第2行!在这个例子,所有的消息是写入到文件 allmsgs-including-informational.log. 然后,所有的消息包含字符串 “informational” 是被丢弃的,这意味着 配置文件行 在‘discard line’下 在我们的例子中第2行不会应用这个消息,那么,所有剩下的行业会被写入到文件 allmsgs-but-informational.log.
:msg, contains, “error” ~ # 忽略包含error的日志
rsyslog ~ 波浪号的更多相关文章
- MacBook Pro/Air 下使用 linux ubuntu 系统 波浪号“~”变成其他 符号 的完美解决办法
打开终端,输入: sudo su - > /sys/module/hid_apple/parameters/iso_layout sudo su -需要root权限,所以使用前请注意已下载roo ...
- jquery选择器空格与大于号、加号与波浪号的区别
空格:$('parent childchild')表示获取parent下的所有的childchild节点,所有的子孙. 大于号:$('parent > child')表示获取parent下的所有 ...
- 波浪号和Hyphen扩展
Bash将波浪号作为路径扩展符 $echo ~ //扩展为当前用户主目录的全路径名/home/user $echo ~user //扩展为用户user的主目录/home/user $echo ~+ / ...
- c#关于路径的总结(转) 虚拟路径波浪号~和斜杠/的区别
c#关于路径的总结(转) 来源:http://www.cnblogs.com/yugongmengjiutian/articles/5521165.html 前一段时间写代码时经常遇到获取路径问题 ...
- c++ 中. 和 ->,波浪号 ~ 符号怎么用 ————很重要
参考:https://www.cnblogs.com/Simulation-Campus/p/8809999.html 1. 用在类中的析构函数之前,表示该函数是析构函数.如类A的析构函数 clas ...
- ; 按快捷键`(即波浪号~所在的键盘按键)立即打开随身U盘中的办公专用文件夹
; 按快捷键`(即波浪号~所在的键盘按键)立即打开随身U盘中的办公专用文件夹; WorkFolderHotkey.ahk;; http://www.autoahk.com/; https://www. ...
- Git命令中波浪号~与脱字符^的区别
0.前言 波浪号~,英文名叫 tilde.脱字符^,英文名叫caret. 这两种符号常见于git reset的情景,简单的项目结构和操作一般不会涉及到两者之间的区别,似乎用哪个都可以.如果遇到比较繁杂 ...
- C 语言 —— ! 和 ~(感叹号和波浪号)
~ 表示按位取反,是位运算符,运算对象是 2 进制. !表示逻辑非,是逻辑运算符,运算对象是真或假.最终的结果也是 0/1 !!:则表示取过一次非之后,再取一次: !!5 ⇒ 1
- CSS中“~”(波浪号)、“,”(逗号)、“+”(加号)、“>”(大于号)、“ ”(空格)详解
“~”:$('pre ~ brother')表示获取pre节点的后面的所有兄弟节点,相当于nextAll()方法: “+”:$('pre + nextbrother')表示获得pre节点的下一个兄弟节 ...
随机推荐
- mysql学习(十)多表查询
多表查询时,要给表名起别名,给字段名其别名(当两个表含有重复字段时) select p.name, c.name, pid from products p, cats c;//得到的结果为笛卡尔乘积 ...
- scanf与gets函数混用 前后位置出错的问题解决
scanf与gets函数混用 利用scanf函数从键盘接收一字符(或整数)时,它只读入字符(或整数)本身,而把字符(或整数)后的回车符留在输入缓冲区内:gets函数从标准的输入读取,如果使用gets函 ...
- hdu 5446 Unknown Treasure 中国剩余定理+lucas
题目链接 求C(n, m)%p的值, n, m<=1e18, p = p1*p2*...pk. pi是质数. 先求出C(n, m)%pi的值, 然后这就是一个同余的式子. 用中国剩余定理求解. ...
- 修改vim默认tab为4个空格与显示行号
添加一个.vimrc配置文件即可. 在home目录下 vim .vimrc # 添加如下内容 set ts=4 set expandtab set nu 然后再次用vim打开任意文件,就看见效果啦!
- IC卡
本词条由“科普中国”百科科学词条编写与应用工作项目 审核 . IC卡 (Integrated Circuit Card,集成电路卡),也称智能卡(Smart card).智慧卡(Intelligent ...
- matlab绘制函数
>> x1=linspace(,*pi,); x2=linspace(,*pi,); x3=linspace(,*pi,); y1=sin(x1); y2=+sin(x2); y3=+si ...
- CSS实现页面背景自动切换功能
From here:http://xiaomiya.iteye.com/blog/2047728 请看效果图: 完整代码如下: <!DOCTYPE HTML> <html> & ...
- BZOJ 3237([Ahoi2013]连通图-cdq图重构-连通性缩点)
3237: [Ahoi2013]连通图 Time Limit: 20 Sec Memory Limit: 512 MB Submit: 106 Solved: 31 [ Submit][ St ...
- AndroidUI 视图动画-移动动画效果 (TranslateAnimation)
移动动画效果可以使用 TranslateAnimation; <Button android:id="@+id/btnTranslate1" android:layout_w ...
- skiing(搜索+记忆化搜索)
skiing 时间限制:3000 ms | 内存限制:65535 KB 难度:5 描述 Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激.可是为了获得速度,滑的区域必须向下倾斜,而且当 ...