Subject: Re: misc/20733: would like a new feature with syslogd
To: None <tech-userlevel@netbsd.org>
From: Quentin Garnier <netbsd@quatriemek.com>
List: tech-userlevel
Date: 03/17/2003 16:43:49
This is a multi-part message in MIME format.

--Multipart_Mon__17_Mar_2003_16:43:49_+0100_08e8c200
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Le Sun, 16 Mar 2003 10:50:28 -0800
Soren Jacobsen a =E9crit :
> On Sun, Mar 16, 2003 at 02:42:45PM +0100, cube wrote:
> > I wonder if !prog or +hostname are worth implementing too.
>=20
> I think those would be very valuable.

For some reason, I find this hack quite ugly. It works to keep
configuration file compatibility, but I'd prefer something like :

program@host:facility.priority

as a selector, which would break compatibility.

Anyway, it's still a hack, and the next thing "needed" would be regexing
the logs, finer control of filters (wildcards mostly). And then it's just
bloat.

Patch attached nonetheless.

--=20
Quentin Garnier - cube@cubidou.net
"Feels like I'm fiddling while Rome is burning down.
Should I lay my fiddle down and take a rifle from the ground ?"
Leigh Nash/Sixpence None The Richer, Paralyzed, Divine Discontents, 2002.

--Multipart_Mon__17_Mar_2003_16:43:49_+0100_08e8c200
Content-Type: application/octet-stream;
 name="syslogd.diff"
Content-Disposition: attachment;
 filename="syslogd.diff"
Content-Transfer-Encoding: base64

SW5kZXg6IHN5c2xvZy5jb25mLjUKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2c3Jvb3Qvc3JjL3Vz
ci5zYmluL3N5c2xvZ2Qvc3lzbG9nLmNvbmYuNSx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS45CmRp
ZmYgLXUgLXIxLjkgc3lzbG9nLmNvbmYuNQotLS0gc3lzbG9nLmNvbmYuNQkyMDAyLzAyLzAyIDAx
OjU4OjUyCTEuOQorKysgc3lzbG9nLmNvbmYuNQkyMDAzLzAzLzE3IDE1OjMzOjAzCkBAIC02MCwx
MyArNjAs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XJpc29uIGZsYWcKKyAqLworaW50CitkZWNvZGVfY29tcChjaGFyICoqcGJ1ZikKK3sKKwlp
bnQgY29tcCA9IDAsIGZsYWcgPSAwOworCisJZXJybm8gPSAwOworCWlmICgqKnBidWYgPT0gJyEn
KSB7CisJCWNvbXAgfD0gQ09NUF9OT1Q7CisJCSgqcGJ1ZikrKzsKKwl9CisJZm9yKDs7KCpwYnVm
KSsrKSB7CisJCWlmICgqKnBidWYgPT0gJz0nKQorCQkJZmxhZyA9IENPTVBfRVE7CisJCWVsc2Ug
aWYgKCoqcGJ1ZiA9PSAnPCcpCisJCQlmbGFnID0gQ09NUF9MVDsKKwkJZWxzZSBpZiAoKipwYnVm
ID09ICc+JykKKwkJCWZsYWcgPSBDT01QX0dUOworCQllbHNlCisJCQlicmVhazsKKworCQlpZiAo
Y29tcCAmIGZsYWcpCisJCQlsb2dlcnJvcigiV2FybmluZzogYCVzJyByZWR1bmRhbnQgY29tcGFy
YXRvciIsCisJCQkgICAgKnBidWYpOworCQljb21wIHw9IGZsYWc7CisJCWZsYWcgPSAwOworCX0K
KworCWlmIChjb21wID09IDApCisJCXJldHVybiBDT01QX0VRIHwgQ09NUF9HVDsKKwllbHNlCisJ
CXJldHVybiBjb21wOworfQogCiAvKgogICogIERlY29kZSBhIHN5bWJvbGljIG5hbWUgdG8gYSBu
dW1lcmljIHZhbHVlCg==

--Multipart_Mon__17_Mar_2003_16:43:49_+0100_08e8c200--