If you put the userid into the MDC when the user logs in You should be
able to filter based on that value. Querying a database for this
information would be as simple as:
SELECT * FROM Log WHERE LoggedInUserId = ?
A FileAppender might generate logs that look like this:
DEBUG 5/11/2005 [smith] User logged in from host [xyz].
DEBUG 5/11/2005 [jones] User logged in from host [abc].
DEBUG 5/11/2005 [ryan] User logged in from host [xyz].
DEBUG 5/11/2005 [smith] User logged in from host [def].
An approximate layout pattern for that would be:
%p %d [%X{LoggedInUserId}] %m%n
--- "Shrivastava, Ravi" <[EMAIL PROTECTED]> wrote:
> I am trying to use Log4Net in a server enviroment. I would like to
> have
> the following features:
>
> 1. One log file for the server
> 2. Individual log files for every client that logs in.
>
> As the clients will be running in the same process/memory space (of
> the
> server) - how do I configure Log4Net to do 1 & 2? Any help will be
> greatly appreciated.
>
> -- RS.