I know php but my server doesn’t support it but support ruby.
But unfortunately, I have few knowledge about ruby.
I just want to save errors of my javascript application and activities of users in the javascript application.
I probably need a ruby program which processes the followings:
– get data which submitted with jQuery.post() from the page of the application.
– create a name of a log file which formatted like YYYY-MM-DD.log.
– open the log file.
– lock the log file.
– add the data to the end of the file.
– unlock the log file.
– close the log file.
The Logger class in Ruby’s standard library should cover your needs. The date can be formatted with [Logger#datetime_format=]. Here’s an example.