README.md in researchable_loggable-1.0.2 vs README.md in researchable_loggable-1.1.0
- old
+ new
@@ -59,18 +59,28 @@
## Usage
For a brand new Rails application, adding this gem to the Gemfile should be all the configuration that is needed. This
gem will automatically configure the Rails logger and lograge to follow the Researchable standard.
-There is only one parameter that is configurable, and that is `production_like`. By default loggable will only
+
+### Parameters
+This are the parameters that can be configured in the `config.loggable` namespace:
+
+`production_like`. By default loggable will only
modify how the logs look on production. This is because the format that this gem enforces is slightly less
human readable (in favour of machine readability and compatibility with the Elastic Common Schema) than the default
Rails one. For development, the more human readable format is preferred. However, if you want to override this and
log in the production format while on development (e.g. because you are troubleshooting a problem with the logs or you
are developing against this gem) then you may add the following to your `config/environment/development.rb` file:
```ruby
config.loggable.production_like = true
```
+
+`current_user_method`. This is the name of the method that will be called on the controller to get the current user. By default this is set to `current_user`. If you want to override this, you may add the following to your `config/application.rb` file:
+```ruby
+config.loggable.current_user_method = :my_current_user_method
+```
+This method is used for ECS logging, if the method is not found, the user.id field will be set to nil.
No other configuration options are provided because this gem seeks to enforce consistency across all applications.
For applications that already had some level of log customization, some cleanup might be needed: