How I used Rails Logger to see through

Rails Logger

Log Levels

config.log_level = :debug

Log Tags

config.log_tags = [:uuid, :remote_ip, lambda { |req| Time.now }]
config.log_tags = [:uuid, :remote_ip, lambda { |req| Time.now }]
log with the UUID, IP Address and the Time it happens

To avoid displaying asset pipeline logs

group :development do
gem 'quiet_assets'
end

Log Rotation

tail -f development.log
cd etc/logrotate.d
nano rails_diary_web
~/Workspace/diary_web/log/*.log {   
daily
missingok
rotate 14
compress
delaycompress
notifempty
copytruncate
}
sudo logrotate /etc/logrotate.config --debug

--

--

Developer ❤️ JS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store