Since log4javascript runs on the client, all logs will be generated by the Browser used by individual clients. "Multiple Users" of your site can mean either of the following:
- Multiple instance of your website opened in different tabs of the same browser
- Different users on different machines using a browser to view your website
Now, log4javascript has a concept of "appenders", which you might have read about, and has the following available appenders:
- AlertAppender
- AjaxAppender
- PopUpAppender
- InPageAppender
- BrowserConsoleAppender
For case (1) above, not sure if you can log "to the same file" - since none of these appenders allow you to log to files. For case (2) - logging to the same file is irrelevant since the logs are generated on different machines for different clients.
To answer your question, I'm pretty sure if you use the PopUpAppender, then a window will pop up for the first page then the next page will continue logging to the same PopUpAppender Window without having to worry about any handles. Same goes for the BrowserConsoleAppender.
If you are looking to collect logs generated by multiple clients at your server, then the best way would be to use the AjaxAppender. In this case, appending the logs to the "same file" or "same stream" (or whatever) for the same client/user depends on how you implement the server-side handler for the AjaxAppender. One of the approaches that comes to mind is that the URL used by each client for the AjaxAppender would contain the user ID or any unique client identifier which would help the server recognize the user/client from which the logs are coming and then save all logs at one place on the server.