README.md in le-2.4.0 vs README.md in le-2.5.0
- old
+ new
@@ -39,12 +39,13 @@
bundle install
This will install the gem on your local environment.
The next step is to configure the default rails logger to use the logentries
-logger.
+logger.
+
In your environment configuration file ( for production : `config/environments/production.rb`), add the following:
Rails.logger = Le.new('LOGENTRIES_TOKEN')
If you want to keep logging locally in addition to sending logs to logentries, just add local parameter after the key.
@@ -71,7 +72,45 @@
You can also specify the default level of the logger by adding a :
Rails.logger = Le.new('LOGENTRIES_TOKEN', :log_level => Logger::<level>)
For the `LOGENTRIES_TOKEN` argument, paste the token for the logfile you created earlier in the Logentries UI.
+
+
+Step for setting up DataHub
+---------------------------
+
+**datahub_endpoint - User Defined Array**
+
+datahub_endpoint = Array ["127.0.0.1", "10000"]
+datahub_endpoint is a user defined variable array for a datahub_endpoint
+The 1st parameter is a String which is the DataHub Instance's IP Address. Entering ANY value in this field will disable your Token-based
+logging, set your Token to "" and will direct all log events to your specified DataHub IP Address.
+
+The 2nd parameter is a String which is the DataHub Port value, default is 10000 but this can be changed on your DataHub Machine.
+This port number must be set, on your DataHub Machine's leproxy settings your /etc/leproxy/leproxyLocal.config file. It's default is 10000
+NOTE: if datahub_endpoint has been assigned an IP address and SSL = true, your server will fail gracefully.
+When using Datahub do not enable SSL = true
+
+
+**host_id**
+
+host_id = "abc1234"
+Enter_host_id inside the quotation marks. Leaving this empty leave the host_id empty and thus not appear in your log events.
+
+
+**custom_host_name - User Defined Array**
+
+custom_host = Array[ true, "mikes_app_server"]
+The 1st parameter is a Boolean value to use the custom host name.
+The 2nd parameter is a String which is the custom_host_name you'd like to assign.
+
+If the 2nd parameter is left as in custom_host = Array[ true, ""] the code will attempt to get your host machine's name using the socket.gethostname method.
+
+
+
+Using the above user defined variable settings, you can now also specify the several of the optional arguments for the logger constructor by adding:
+
+ Rails.logger = Le.new(token, :ssl=>ssl, :datahub_endpoint=>datahub_endpoint, :host_id=>host_id, :custom_host=>custom_host)
+
Now, simply use `Rails.logger.info("message")` inside your code to send logs to Logentries