Contents:

debug.txt - contains debugging information; opened in overwrite mode ('>') per request
debug.log - contains debugging information; opened in append mode ('>>'); rotated using log_rotate.pl (count => 3)

sql.txt - contains SELECT query statements from application in production mode; opened in append mode; rotated using log_rotate.pl (count => 3)
dev_sql.txt - contains SELECT query statements from application in development mode; rotated using log_rotate.pl (count => 3)

{yyyy_mmdd}_sql.log - contains UPDATE/INSERT/DELETE statements from application in production mode; archived in /old daily using log_rotate.pl
dev_sql.log - contains UPDATE/INSERT/DELETE statements from application in development mode; rotated using log_rotate.pl (count => 3)

file ownership:
sql.txt 	666 raj:raj
debug.log 	666 raj:raj
dev_sql.log 644 raj:raj
dev_sql.txt 644 raj:raj
yyyy_mmdd_sql.log 666 www-data:www-data

To truncate file in use:
  sudo cp new_msgs.log new_msgs.log.nn && sudo cat /dev/null > new_msgs.log
  sudo chown raj:raj new_msgs.log.nn
