<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:"MS Serif";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"\@MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:Arial;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>One of our MAVEN project is using Logback and it is having
requirement to store the log content into MySQL db (version 5.0). Below are my
Logback configuration and the output for the same.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
<b><u><span style='font-weight:bold'>CONFIGURATION<o:p></o:p></span></u></b></span></font></p>
<p class=MsoNormal><b><u><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial;font-weight:bold'><o:p><span style='text-decoration:none'> </span></o:p></span></font></u></b></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'><configuration
debug="false"><o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> <appender
name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender"><o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> <layout
class="ch.qos.logback.classic.PatternLayout"><o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'>
<pattern>[%level] %X{module} %msg%n</pattern> <o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> </layout><o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> </appender><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
<appender name="<span style='background:yellow'>DB</span>"
class="ch.qos.logback.classic.db.DBAppender"><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
<connectionSource
class="ch.qos.logback.core.db.DriverManagerConnectionSource"><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
<driverClass>com.mysql.jdbc.Driver</driverClass><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
<url>jdbc:mysql://localhost:3306/logback_db</url><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
<user>root</user><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
<password>mypassword</password><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
<insertHeaders>true</insertHeaders><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
</connectionSource><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
</appender><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> <root><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'>
<level value="${ROOT_LOGGER_LEVEL}"/><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'>
<appender-ref
ref="DB" /><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> </root><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> <root><o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=3
face=Arial><span style='font-size:12.0pt;font-family:Arial'> <level
value="${ROOT_LOGGER_LEVEL}"/><o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=3
face=Arial><span style='font-size:12.0pt;font-family:Arial'> <appender-ref
ref="STDOUT"/><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'> </root><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'></configuration><o:p></o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='text-indent:.5in'><b><u><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial;font-weight:bold'>OUTPUT IN THE
CONSOLE<o:p></o:p></span></font></u></b></p>
<p class=MsoNormal style='text-indent:.5in'><b><u><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial;font-weight:bold'><o:p><span
style='text-decoration:none'> </span></o:p></span></font></u></b></p>
<p class=MsoNormal style='text-indent:.5in'><font size=3 face=Arial><span
style='font-size:12.0pt;font-family:Arial'>For <span style='background:yellow'>correct
db parameters</span><o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=3
face=Arial><span style='font-size:12.0pt;font-family:Arial'>[INFO]
[app-core:internal]<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=3
face=Arial><span style='font-size:12.0pt;font-family:Arial'>Driver
name=MySQL-AB JDBC Driver<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=3
face=Arial><span style='font-size:12.0pt;font-family:Arial'>Driver
version=mysql-connector-java-5.0.8 ( Revision: ${svn.Revision} )<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=3
face=Arial><span style='font-size:12.0pt;font-family:Arial'>supportsGetGeneratedKeys=true<o:p></o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=3
face=Arial><span style='font-size:12.0pt;font-family:Arial'>true<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
For <span style='background:yellow'>wrong db parameters</span><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>
[INFO]
[app-core:internal] false<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>The above configuration is not creating any db tables and
not able to store the content. Please let me know the necessary changes to
these configurations.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'>Thanks in advance…<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>--</span></font><o:p></o:p></p>
<p class=MsoNormal><strong><b><font size=2 color="#8080c0" face="MS Serif"><span
style='font-size:10.0pt;font-family:"MS Serif";color:#8080C0'>Thanks and
Regards</span></font></b></strong><o:p></o:p></p>
<p class=MsoNormal><strong><b><font size=2 color="#8080c0" face="MS Serif"><span
style='font-size:10.0pt;font-family:"MS Serif";color:#8080C0'>Shivashankar</span></font></b></strong><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<br><br><table bgcolor=white style="color:black"><tr><td><br>iGATE is Ranked No. 1 in DQ-IDC best IT employer survey and Ranked No.2 <br>
by Business Today-Mercer Human Resource Consulting-TNS in a cross industry survey of Best Companies to work for in India<br>
----------------------------------------------------------------DISCLAIMER---------------------------------------------------------<br>
Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual <br>
or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under <br>
applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or mailadmin@igate.com <br>
and delete this EMAIL including any attachments</td></tr></table></body>
</html>