My ruby application is running on platform Ruby 2.7 on Amazon Linux2. The application create a logger by using below code:
Rails.logger = Logger.new(File.join(Rails.root, 'log', 'server.log'))
The application runs well, but the server.log
file doesn't exist in var/log
I tried replace above code with below:
Rails.logger = Logger.new('server.log')
Still cannot find server.log
file. Can you please tell which directory the server.log will be in?