In config.php, edit the following lines:
We set here 4 as the logging level, but you can put any number between 0 and 5, which have the following meanings:
0: No logging
1: Security attacks attempts, errors and important messages (recommended level)
2: Reserved for debugging (only logs if DEBUG is true in config.php)
3: + Warnings and EventLogs, VIEW/ACTION and Request URIs and URI redirections and POST/COOKIE values
4. + plugin events, curl requests, some function calls with their parameters, etc.
5: + include suppressed actions and SMTP traffic.
6: + Action responses (ajax,serialized,XML (as array)
Remember to put quotes around the file you specified next to LOG_TEXTFILE. You must create this file and give it writing permissions to the user under which your webserver runs. Also, don't put this file under the webserver documents root directory, as it will contain passwords and other sensitive information.
If you're trying to generate a log to send to support to help them diagnose problem, enable logging just before reproducing the problem, and then disable it just after having reproduced the problem, so the log will only show what support needs to know.