<p>So we've discussed logging in passing at my place of work and I was wondering if some of you guys here could give me some ideas of your approaches?</p>

<p>Typically our scenario is, no logging really at all, and mostly .NET apps, winforms/WPF clients talking through web services or direct to a db.</p>

<p>So, the real question is, where or what would you log?  At the moment we have users reporting error messages - so I would assume log startups/shutdowns, exceptions...</p>

<p>Do you take it to calls to the web services or db?  Page loads?</p>

<p>How do you get a good idea of what the user was trying to do at the time?</p>

<p>Is it better to go all the way and log everything across multiple attempts/days, or log only what you need to (given hdd is cheap).</p>

<p>I guess that's a few questions, but I wanted to get more of an idea of what the actual practice is out there in larger shops!</p>

As a quick answer I would say to come up with a series of categories and have switchable logging levels, e.g. info, warning, error, critical, etc.
Then make it easy to set the logging level to tune the level of detail that you need. Typically, set the logging level in a config file and stop and restart the app.
I would also publicize to the developers what the meaning is for each of the levels.
edit: I would also set up a system to rotate out, compress and archive log files on a regular basis, maybe nightly.