logging on davidchua https://dchua.com/tags/logging/ Recent content in logging on davidchua Hugo -- gohugo.io en-us Tue, 19 Jul 2016 00:00:00 +0000 Logging Tornado Logs To Graylog (with JSON) https://dchua.com/posts/2016-07-19-logging-tornado-logs-to-graylog/ Tue, 19 Jul 2016 00:00:00 +0000 https://dchua.com/posts/2016-07-19-logging-tornado-logs-to-graylog/ If you’re building your microservices on Tornado and your chosen deployment strategy is to treat it like cattle instead of pets, logging is going to have to play a very important part of your architecture. To ensure that all your information is logged and stored in a centralized location, I built a full HA cluster of graylog nodes and elasticsearch nodes which I will use to keep track of my application. Using Graylog Extractors to Split Logs https://dchua.com/posts/2015-12-25-using-graylog-extractors/ Fri, 25 Dec 2015 00:00:00 +0000 https://dchua.com/posts/2015-12-25-using-graylog-extractors/ If you’re new to Graylog, Graylog Extractors are a great way to pull out information from your logs for easier storing and manipulation. If like me, you sometimes experience a “String fields longer than 32kb” indexing error on one of your fields, a good way to help mitigate it is to use extractors to split your field into two. I wouldn’t recommend this all the time as obviously the way to solve this is to set your particular field to be non_indexable but in certain cases when you need the full data and still want to be able to search for it, this might be the better solution. How to setup Fluentd to Log to S3 with Rails https://dchua.com/posts/2014-11-25-how-to-setup-fluentd-to-log-to-s3/ Tue, 25 Nov 2014 00:00:00 +0000 https://dchua.com/posts/2014-11-25-how-to-setup-fluentd-to-log-to-s3/ Logging is important. When you’re running a fully fledge production application server, you do not have the luxury of monitoring your rails console all the time. In this example, I will go through with you the process of setting up Fluentd with your Rails App to log data and to upload them onto S3 for persistent archival purposes. Pre-requsite Running Trusty (14.04) Ruby 2.1.2 installed An AWS Account with your AWS Credentials (key and token) ready Step 1: Download Td-Agent Wait, isn’t this a Fluentd tutorial?