By default, logworm will record entries about the HTTP requests that your app receives in a web_log table.
It is also possible to add arbitrary, app-specific fields to those log entries, by calling log_with_request. For example, you can use it to record information about the user that requested the page, in in the same web_log table.
log_with_request :user_id => @user.id
You can call log_with_request several times within the processing of an incoming request; it will merge successive hashmaps into one. The resulting hashmap will in turn be merged with the set of information that goes onto web_log which means that you can (intentionally or not) overwrite the information that naturally goes in web_log.
log_with_request :user_id => @user.id, :user_name => @user.name
log_with_request :user_state => @user.state
Back to Logging and querying web requests or On to querying with the web-based console