Semantic Logger directly supports a centralized logging system consisting of:
- Semantic Logger
- Distributed, scalable, and highly available data store
- Analytics and search dashboard for Elasticsearch
For simplicity these installation notes use homebrew on Mac OSX. Following the product links for information on installing on other platforms.
brew install elasticsearch
Follow the on-screen instructions to auto-start elasticsearch.
brew install kibana
Follow the on-screen instructions to auto-start kibana.
Configure the application to forward all log messages to Elasticsearch.
Add the following code to a Rails initializer if running rails with the
or add the code directly to your application:
SemanticLogger.add_appender( appender: :elasticsearch, url: "http://localhost:9200" )
Restart the application and let it run to generate several log messages.
Check the text file for any errors. For example:
Assuming Kibana was installed locally with its default port. Open a browser for Kibana http://localhost:5601/.
Add a new index pattern to view in Kibana:
Index contains time-based events.
Enter Index name:
Give Kibana a moment to scan the index, then select
Time-field name and choose
then press the
View logs in browser
If not already open, open Kibana in the browser http://localhost:5601/.
The log entries generated by the application should now be displayed. If not, change the time interval on the top right of the screen.
On the left under
Available Fields add the following columns to the view:
Some example searches:
error level messages:
Only show messages from host
Search logging tags for the string
Semantic Logger also supports several other centralized logging solutions:
See appenders to configure appenders to forward log messages to the centralized logging solutions / log aggregrators.