In general
- If you log DateTime values (not talking about timestamp header fields of logging frameworks) make sure you log them in a meaningful format. "ToString()" usually is not sufficient if you need information about Local vs. Utc or about milliseconds (I use "yyyy-MM-dd HH:mm:ss.fff zzz", YMMV)
- If you log exceptions, go for "ToString()" rather than anything else. Controversial maybe, but look here for reasons.
About senstive or detailed information, as others have already said, you have to watch out. It is not only about people who are entitled to read your production logs getting more information than necessary, also think about the case that any intruder to a system can get valuable information for overly verbose logs (which is why I wouldn't log a set of users permissions with the error that he hasn't got a particular one, was was suggested in another answer).
It might depend on your environment or customer what is considered sensitive, but examples are:
- Actual user input in error messages.
- User permission sets, etc.
- SQL statements, especially with actual parameters
- XML request/response structures
Finding the right granularity of information to log is always a tradeoff between the amount of information logged, the performance it costs to not only write but also to produce this information in code and the senstivity of that information. And that is the reason why any serious logging system sports "levels" or "categories".
You could log potentially senstive information at a "level" or "category" that can be switched on in development but off in production. If you really want to go overboard, you could write an EventLog entry when your application detects that such logging is enabled, so it doesn't "slip" through in production.
Finally, consider using a logging framework that allows changing those levels or categories during runtime. This way, you can enable more information if required, in a controlled way without disrupting the application's work or resetting a situation that you wanted to inspect by the need to restart the application first.