In a standalone tomcat instance you would configure server.xml
or context.xml
in tomcat to define the data source as per normal (see here)
For using it locally in Eclipse, i.e. without a Web container, you'd change your connectionSource
to something like:
<connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource">
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://host_name:3306/datebase_name</url>
<user>username</user>
<password>password</password>
</connectionSource>
See also, logback manual on appenders which has a tomcat example.