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节点的下一个兄弟节 ...
随机推荐
- 顺序表--MyArrayList的实现
实现的MyArrayList实为顺序表结构,其中要实现Iterable时必须在内部实现Iterator,即为该表的迭代器. public class MyArrayList<AntType> ...
- vb combobox 用法问题总结
问题一 combobox 通过type类型,如下代码,通过选取name名称(改变combobox的名称)得到 其Id Type User id As Integer userName As Strin ...
- [转]数组引用:C++ 数组做参数 深入分析
"数组引用"以避免"数组降阶"(本文曾贴于VCKBASE\C++论坛) 受[hpho]的一段模板函数的启发,特写此文,如有雷同,实在遗憾. 数组降阶是个讨厌的事 ...
- MYSQL 二进制还原
解决方法: mysqlbinlog bin_log_file_path_and_name | mysql -uroot -p 如: mysqlbinlog E:\DB\mysql_log\mysql_ ...
- WPF(MultiTrigger)
原文 http://blog.csdn.net/haifengzhilian/article/details/8822098 <Window x:Class="TestResource ...
- docker 配置桥接网络
2.5 docker配置桥接网络(上): 为了使本地网络中的机器和Docker 容器更方便的通信,我们经常会有将Docker容器 配置到和主机同一网段的需求. 这个需求其实很容器实现, 我们只需要将D ...
- css案例学习之div与span的区别
代码: <html> <head> <title>div 标记范例</title> <style type="text/css" ...
- RHEL安装时加载第三方raid驱动
IBM x3650 M3服务器做完RAID之后,不能直接的安装Linux系统,会报出没有硬盘的错误 过程如下: 1.到IBM的官方网站下载device drive 下载后的为:ibm_dd_sraid ...
- Spring-----Spring Jar包
转载自:http://blog.csdn.net/hekewangzi/article/details/51713110
- linux可执行文件目录的区别
/bin./sbin./usr/bin./usr/sbin目录的区别 在linux下我们经常用到的四个应用程序的目录是/bin./sbin./usr/bin./usr/sbin .而四者存放的文件一般 ...