多行成单行输出到logging器
我有一个日志文件,其中的数据条目如下每个条目以时间开始: time: 20170509123420 dn: uid=abc,ou=People,dc=test,dc=example,dc=com changetype: modify replace: passwordAllowChangeTime replace: passwordExpirationTime replace: passwordRetryCount replace: pwdpolicysubentry replace: modifiersname modifiersname: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot replace: modifytimestamp modifytimestamp: 20170509113420Z time: 20170509123621 dn: cn=nsPwPolicyContainer,dc=test,dc=example,dc=com changetype: add objectClass: nsContainer objectClass: top cn: nsPwPolicyContainer creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoo 现在我想打印为单行,只有时间之间的条目: 例如,时间之后,我想把所有logging打印成单行,所以在我的情况下,它应该打印 time: 20170509123420 dn: uid=abc,ou=People,dc=test,dc=example,dc=com changetype: modify replace: passwordAllowChangeTime – replace: passwordExpirationTime – replace: passwordRetryCount […]