Blog Archives

Auditing database tables Oracle tutorial

Triggers give you control just before data is changed and just after the data is changed. This allows for: 1) Auditing tables for changes like update, insert, and delete. 2) Data validation and column formatting before and after inserts into database. Q. … Read more ›...

Java logging beginner tutorial with slf4j and Apache commons logging

Slf4j is indeed just a logging facade so that one can you can plug in his/her own logging frameworks like java.util.logging, log4j, Apache commons logging, and logback. Native implementation of slf4j is logback. Step 1: Create a new Maven based Java project. Step 2: Import this project into eclipse with...

Logging and auditing in Java with Spring AOP

Auditing can be done in Servlet filters to log requests and responses, you can add interceptors in many frameworks, and AOP (Aspect Oriented Programming) allows you to add cross cutting concerns as described in this tutorial with Spring and AOP. Step 1: Create a new Maven based Java project. …...

Logging in Java with Logback and MDC Tutorial

Logback brings a very large number of improvements over log4j like faster execution, native support for SLF4J,XML or Groovy based configuration files, automatic reloading of config files to name a few. logback builds upon on our previous work on log4j, simply put, logback is just a better log4j.

Read more ›

Splunk to analyse Java logs and other machine data

Q1. What is Splunk and where will you use it?
A1. Splunk is an enterprise-grade software tool for collecting and analyzing “machine data” like log files, feed files, and other big data in terra bytes. You can upload logs from your websites and let Splunk index them,

Read more ›

Unix script to archive files for auditing

Q1. How will you move files that are older than X (e.g 7) days to their own archive folders to be zipped later on? A1. you run it like The files will be archived under “/etc/archive/{date}” Q2. Can you write a script to purge files that a older than say...

Java Interview FAQs

800+ Java Interview Q&As