How do server administrators like their server logs?
I'm a software developer and I'm building an HTTP server. Since I have no experience in hosting and managing servers, I have problems with balancing logging performance with usability.
For example, is it acceptable to use one log file per domain? Or one per process? There are plenty of performance reasons why using several logs may be a good idea, but I don't want the server to become obnoxious to use for the end user.
How are log files approached generally? Is it acceptable to require some sort of post-processing or combination of shell tools to access them conveniently?
I appreciate any input. Thanks.
Solution 1:
Use standard tools and frameworks, which will be configurable. Look at Log4j as an example; it lets the deployer determine how verbose, how to rollover, how big the files can be.
...and support syslog. And if you're deploying on Windows, also support Windows Events.
Solution 2:
Not sure about why you want to take such a challenging task as to build a http server, but my answer is: make it so that the user might personalize them. http servers logs can really be some HUGE stuff and sometimes hard to look into, so it's very useful to let the administrator decide to split the logs into more files. You should look at Apache for examples: lets you specify different logs for accesses, errors and modules, and even to split them depending on the related virtual host/website (which is also very useful for building usage statistics from those).