[syslog-ng]logfile save problem (again ;)
Balazs Scheidler
bazsi@balabit.hu
Wed, 17 Jul 2002 13:35:09 +0200
On Wed, Jul 17, 2002 at 11:33:41AM +0200, Buerger, Manfred wrote:
> hello,
>
> i have changed my config as you told me to do:
>
> destination local7 {
> file("/var/log/syslog-ng/$SOURCEIP/local7.log"
> sync(0) log_fifo_size(10) create_dirs(yes)
> owner(root) group(system) perm(0660) dir_perm(0770));
> };
>
> but i have still the same problem!
> the message: "Jul 17 02:19:19 %STATIC-W-GWAYNOTREACH,/10.146.18.5 Gateway
> 172.28.3.126 is not reachable."
> is stored in "/var/log/syslog-ng/%STATIC-W-GWAYNOTREACH,/local7.log" and not
> in "/var/log/syslog-ng/10.146.18.5/local7.log" !!!
Are you sure you have reloaded the configuration?
SOURCE_IP always inserts IP addresses, as the following snippet shows:
case M_SOURCE_IP: {
char *ip;
if (msg->saddr) {
CAST(inet_address_info, addr, msg->saddr);
ip = inet_ntoa(addr->sa.sin_addr);
}
else {
ip = "127.0.0.1";
}
length = append_string(dest, left, ip, strlen(ip), escape);
break;
}
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1