We have 2 asp.net web servers working through the LoadBalancer that are accessible externally. Earlier, for all applications we did logging into DB. Now we have 1 more app that doesn't work with DB, it is used for 'messages transferring'. On TEST environment it does logging into files into a local folder.
If we deploy it "as is" to PROD we will have 2 separate log file开发者_如何学JAVAs... that is not very good idea. Connecting to DB just for logging doesn't seem reasonable too...
Possible solution could be store log file into a shared folder somewhere on another server... but, I not sure if this is the best solution.
Please advise.
In the past, I have just stored the web logs on each machine in the farm. We then used an off the shelf piece of software (I don't recall which one it was) to periodically download the files from each machine in the farm.
This solution worked well for us - YMMV.
The feature of our "Load Balancer" is that most of the time only 1 server works (we use very cheap solution that on low load it doesn't allow really balancing, it provides availability only). So for now I will store log information in log-folder on "own" server...
精彩评论