I am pretty new in Rails. I need to log some info into a file inside a function from a class derived of ActionController::Base. I only need to append to the file once, but I should make sure any concurrent processes/threads do not destroy my lines. I do not need any fancy time/IP, etc formatting in my logs.
I have been trying to figure out how to create a custom log but I get confused as all available examples derive it from ActiveRecord::Base (see for example this answer). I also checked how to atomically write to a file with File#flock, but I am not sure whether this is what I really need.
Any help pointing me to th right direction will be appreciated!