# [solved] syslog-ng different logs for clients/users

## mistake25

hi,

i have ftp server, logging is provided by syslog-ng. is there way how to setup syslog to store logs like

/var/log/ftp/client.ip.log

/var/log/ftp/another.client.ip.log

or

/var/log/ftp/user.log

/var/log/ftp/another_user.log

i've tryied to use $HOST variable, but that returns ip of server not client.

thanksLast edited by mistake25 on Tue Sep 14, 2010 7:16 pm; edited 1 time in total

----------

## Hu

What ftp server are you using?  There are many choices.

----------

## gerdesj

I wouldn't normally suggest this sort of thing but if you need a really flexible logger then try rsyslog.  I'm happy to provide assistance on this.

However, if you are just interested in this particular problem - then as posted by "Hu" - your ftpd please?

Cheers

Jon

----------

## cwr

Syslog can parse out logged messages, which I assume will include the name

of the client.  I can't recall, though, if there's a maximum number of logfiles

syslog-ng can handle.  I've only ever used it for simple stuff, something like

this:

destination elvis { file("/var/log/elvis.log"); }

filter f_elvis { facility(local0); };

log { source(src); filter(f_elvis); destination(elvis); };

You'll need to add a match statement to the filter; check the syslog-ng home

page for full docs.

Alternatively, it may just be easier to use an ftp server with better logging.

Will

----------

## mistake25

thanks to cwr i have successfully set my syslog, to do what i want  :Smile: 

----------

