Configure Log4j2 Converter Plugin -Java (Filter log messages)

Apache Log4j2 is used for printing info, error, debug, trace logging statements in enterprise applications. Inorder to format all the log messages externally before printing in logs, we need to create Filters in Log4j 1.x versions. In Log4j2 , we can use LogEventPatternConverter to filter/convert/format log messages before printing in the log files in server. …

Configure Log4j2 Converter Plugin -Java (Filter log messages) Read More »

Configure Log4j2 -Java in minutes

Apache Log4j2 is used for printing info, error, debug, trace logging statements in enterprise applications. Apache Log4j2.x is an extension of Log4j1.x which has more significant features comparatively.Since major security vulnerabilities like Log4jShell & hacking possibilities are identified in Log4j1.x, it is always recommended to use Log4j2.x. It is pretty simple to configure Log4j2 in …

Configure Log4j2 -Java in minutes Read More »

SimpleDateFormat (Parse Date)

Date conversions are very common scenarios in any application., Java Provides SimpleDateFormat class for String to Date, Date to String conversions. The below example shows How String format can be converted to Date Format. How to find difference between 2 Dates. Code:

Output

Tranform XML using XSLT (XML XSLT)

To transform XML to another XML/HTML/TEXT format using XSLT., we need the following files. Input XML (.xml) XSLT file which contains the transformation script. (.xsl) The below XML (input.xml) input file, can be transformed into a html with the xsl (trans.xsl) file. Sample Input XML:File: input.xml

In the above XML file, we could see …

Tranform XML using XSLT (XML XSLT) Read More »