Technology

Collecting Tomcat logs using Fluentd and Elasticsearch

In our previous blog, we have covered the basics of fluentd, the lifecycle of fluentd events and the primary directives involved. In this blog, we’ll configure fluentd to dump tomcat logs to Elasticsearch. We’ll also talk about filter directive/plugin and how to configure it to add hostname field in the event stream. Fluentd is a log collector that works on […]

Arun Dhyani
Arun Dhyani
Read

AWS

log_output TABLE vs FILE inside Amazon RDS

Amazon RDS provides us with three different types of logs : 1) General Logs 2) Slow Query Logs 3) Error Logs   You can enable these logs by modifying the DB Parameter Group. 1) Enable General Log [js] Parameter Name : general_log Value : set the value to 1. Default is 0. [/js] 2) Enable […]

Vikash Jha
Vikash Jha
Read

Grails

Groovy Annotations for Logging

We use logging in our application to report and persist error and warning messages as well as info messages (e.g. runtime statistics) so that the messages can later be retrieved and analyzed. Initially we were getting an instance of Logger from LoggerFactory and uses it in our class for logging information, errors, exceptions, warnings etc. […]

Technology

@Log annotation

@Log : This annotation provides the log object in groovy class. By using it you don’t need to create the Logger object, it automatically provides log object. Example: [groovy] import groovy.util.logging.Log @Log class Person { String name String address String city public void logDetails(){ log.info("Name:::${name}—>Address ::: ${address}—> city :::${city}") } } new Person(name:"Mohit Garg",address:"Address",city: "city").logDetails() […]

Mohit Garg
Mohit Garg
Read

Grails

Configuring Log4J for logging level specific logs of different packages into file using appenders

Recently i worked upon redirecting all the log related to a specified package in my project to a specific file. It seem very helpful as it provide precise context about run of your application and make it easier to debug as compare to low level debugging method such as println. Here we can also disable […]