You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris Keilitz <ke...@gmail.com> on 2017/02/16 17:26:18 UTC

Tomcat JDBC Connection Pool - Stand Alone Logging

I've implemented Tomcat JDBC connection pool stand-alone, outside of Tomcat
or any app server or container and cannot get the Juli logging working -
console or file.   The connection pool works great, but I cannot get the
logging going.  I've added CATALINA_HOME to the local directory and have
added logging.properties file to the local lib and .conf directories, but
still cannot get it to work.

I know I'm missing something....hoping one of you can me understand what
I'm doing wrong, could try.

Re: Tomcat JDBC Connection Pool - Stand Alone Logging

Posted by Chris Keilitz <ke...@gmail.com>.
I will look into both suggestions, conflicting property files and the debug
version.

I am connecting to MS SQL Server 2008 R2 (SP1), using the sqljdbc41.jar
file.  The access to SQL Server works great, insert, updates, queries,
stored procedures...no issues. I am just trying to activate the logging for
the connection pool.


On Thu, Feb 16, 2017 at 3:16 PM, Aurélien Terrestris <at...@gmail.com>
wrote:

> What database are you connecting to ? Oracle ? MySQL ? If Oracle, then
> you're probably using its specific driver, and there is a debug version
> (the "_g" version) that logs.
>
> According to you, what kind of log the Tomcat driver should write ?
>
> 2017-02-16 19:08 GMT+01:00 Chris Keilitz <ke...@gmail.com>:
>
> > I'm assuming, once configured properly, the Tomcat JDBC connection pool
> > would output log messages. Unfortunately, I currently get no console or
> > file output...even after trying numerous logging.properties changes.
> >
> > I'm hoping for a little help to understand the proper way to configure a
> > stand alone usage of Tomcat JDBC.
> >
> > On Thu, Feb 16, 2017 at 12:58 PM, Christopher Schultz <
> > chris@christopherschultz.net> wrote:
> >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA256
> > >
> > > Chris,
> > >
> > > On 2/16/17 12:26 PM, Chris Keilitz wrote:
> > > > I've implemented Tomcat JDBC connection pool stand-alone, outside
> > > > of Tomcat or any app server or container and cannot get the Juli
> > > > logging working - console or file.   The connection pool works
> > > > great, but I cannot get the logging going.  I've added
> > > > CATALINA_HOME to the local directory and have added
> > > > logging.properties file to the local lib and .conf directories,
> > > > but still cannot get it to work.
> > > >
> > > > I know I'm missing something....hoping one of you can me understand
> > > > what I'm doing wrong, could try.
> > >
> > > When you say that the logging doesn't work, what exactly do you mean?
> > >
> > > "Adding CATALINA_HOME to the local directory" doesn't clarify anything.
> > >
> > > - -chris
> > > -----BEGIN PGP SIGNATURE-----
> > > Comment: GPGTools - http://gpgtools.org
> > > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> > >
> > > iQIcBAEBCAAGBQJYpehVAAoJEBzwKT+lPKRYRIIQAL252B1PA+RdmD0kvxi4XGQw
> > > 1nkfbUpLy3qnZlejj4AMxNZCmNsgxzSVKsuseZXSltiCvsidbuS1VJb+aZ6qI/mC
> > > FaDdrORqA5MJ5JQxCBKF0KHNvm4/P8+7XLW7S0m+CCSUsJ6S4yUfq8soV+giM6vD
> > > I3tEMfQscMnkj3wTzWqKKwY4rs6YJ+ILerwclGmMB1rtpO9lwGFBTj2p2M0NwPav
> > > 9P7LESiUtZGaJMxlS+QFJW+u8xPqQTkQV2xf5ZVbeMZfKqtD14FWrgMzrlRyo27P
> > > 0IhK1qs2I1EdWzPT7O2xEWpcKC9b6P2+su5YIjS4xwDOF9dsSBZfBLgKXhrm8gDf
> > > JI+d0xgC80PzDZfQwv/Spo0J9U4sGPUp9+tTRjI4Ub8M8z4xG/gssNw7eG8RCOfU
> > > NYIK/POB9QPTukUKyEPMXr/DYC7W3b0RP0yjH/yk+hcp3H3Iok/4GVoey8ydhYlT
> > > fI5P7oq1FNXFVoupMEv77eqlzCc6V7CU0idMhjnSjM5Zoio9r+kbONg5oHDBlSDA
> > > yXbPcDPORr+qux6hf73HK8kNH5ae059aF9T8lGC+uW5EyY4YAgQfrhle/3xk+Jub
> > > sGeM8gpVt9eozlNFyZ4LqTXXNtBHzpw5LCTQa1TWS8UQm703+/0DxZmf0EgZwEn5
> > > pN0ov1UkJ4tcT7DA7E0w
> > > =Xqes
> > > -----END PGP SIGNATURE-----
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
>

Re: Tomcat JDBC Connection Pool - Stand Alone Logging

Posted by Aurélien Terrestris <at...@gmail.com>.
What database are you connecting to ? Oracle ? MySQL ? If Oracle, then
you're probably using its specific driver, and there is a debug version
(the "_g" version) that logs.

According to you, what kind of log the Tomcat driver should write ?

2017-02-16 19:08 GMT+01:00 Chris Keilitz <ke...@gmail.com>:

> I'm assuming, once configured properly, the Tomcat JDBC connection pool
> would output log messages. Unfortunately, I currently get no console or
> file output...even after trying numerous logging.properties changes.
>
> I'm hoping for a little help to understand the proper way to configure a
> stand alone usage of Tomcat JDBC.
>
> On Thu, Feb 16, 2017 at 12:58 PM, Christopher Schultz <
> chris@christopherschultz.net> wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA256
> >
> > Chris,
> >
> > On 2/16/17 12:26 PM, Chris Keilitz wrote:
> > > I've implemented Tomcat JDBC connection pool stand-alone, outside
> > > of Tomcat or any app server or container and cannot get the Juli
> > > logging working - console or file.   The connection pool works
> > > great, but I cannot get the logging going.  I've added
> > > CATALINA_HOME to the local directory and have added
> > > logging.properties file to the local lib and .conf directories,
> > > but still cannot get it to work.
> > >
> > > I know I'm missing something....hoping one of you can me understand
> > > what I'm doing wrong, could try.
> >
> > When you say that the logging doesn't work, what exactly do you mean?
> >
> > "Adding CATALINA_HOME to the local directory" doesn't clarify anything.
> >
> > - -chris
> > -----BEGIN PGP SIGNATURE-----
> > Comment: GPGTools - http://gpgtools.org
> > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> >
> > iQIcBAEBCAAGBQJYpehVAAoJEBzwKT+lPKRYRIIQAL252B1PA+RdmD0kvxi4XGQw
> > 1nkfbUpLy3qnZlejj4AMxNZCmNsgxzSVKsuseZXSltiCvsidbuS1VJb+aZ6qI/mC
> > FaDdrORqA5MJ5JQxCBKF0KHNvm4/P8+7XLW7S0m+CCSUsJ6S4yUfq8soV+giM6vD
> > I3tEMfQscMnkj3wTzWqKKwY4rs6YJ+ILerwclGmMB1rtpO9lwGFBTj2p2M0NwPav
> > 9P7LESiUtZGaJMxlS+QFJW+u8xPqQTkQV2xf5ZVbeMZfKqtD14FWrgMzrlRyo27P
> > 0IhK1qs2I1EdWzPT7O2xEWpcKC9b6P2+su5YIjS4xwDOF9dsSBZfBLgKXhrm8gDf
> > JI+d0xgC80PzDZfQwv/Spo0J9U4sGPUp9+tTRjI4Ub8M8z4xG/gssNw7eG8RCOfU
> > NYIK/POB9QPTukUKyEPMXr/DYC7W3b0RP0yjH/yk+hcp3H3Iok/4GVoey8ydhYlT
> > fI5P7oq1FNXFVoupMEv77eqlzCc6V7CU0idMhjnSjM5Zoio9r+kbONg5oHDBlSDA
> > yXbPcDPORr+qux6hf73HK8kNH5ae059aF9T8lGC+uW5EyY4YAgQfrhle/3xk+Jub
> > sGeM8gpVt9eozlNFyZ4LqTXXNtBHzpw5LCTQa1TWS8UQm703+/0DxZmf0EgZwEn5
> > pN0ov1UkJ4tcT7DA7E0w
> > =Xqes
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

Re: Tomcat JDBC Connection Pool - Stand Alone Logging

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chris,

On 2/16/17 1:08 PM, Chris Keilitz wrote:
> I'm assuming, once configured properly, the Tomcat JDBC connection
> pool would output log messages. Unfortunately, I currently get no
> console or file output...even after trying numerous
> logging.properties changes.

Specifically? Would you mind sharing your configuration? Also, where
is your logging.properties file located, and what is the search path
of your class loader?

> I'm hoping for a little help to understand the proper way to
> configure a stand alone usage of Tomcat JDBC.

Having the tomcat-juli.jar library around plus a logging.properties
file should be sufficient. You may have conflicting logging.properties
files available to the classloader.

- -chris

> On Thu, Feb 16, 2017 at 12:58 PM, Christopher Schultz < 
> chris@christopherschultz.net> wrote:
> 
> Chris,
> 
> On 2/16/17 12:26 PM, Chris Keilitz wrote:
>>>> I've implemented Tomcat JDBC connection pool stand-alone,
>>>> outside of Tomcat or any app server or container and cannot
>>>> get the Juli logging working - console or file.   The
>>>> connection pool works great, but I cannot get the logging
>>>> going.  I've added CATALINA_HOME to the local directory and
>>>> have added logging.properties file to the local lib and .conf
>>>> directories, but still cannot get it to work.
>>>> 
>>>> I know I'm missing something....hoping one of you can me
>>>> understand what I'm doing wrong, could try.
> 
> When you say that the logging doesn't work, what exactly do you
> mean?
> 
> "Adding CATALINA_HOME to the local directory" doesn't clarify
> anything.
> 
> -chris
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYpgnxAAoJEBzwKT+lPKRY25kP/3OAnsBtLbqEEvLS7w5g500I
i/t/BemhQHtlbU/ZGOg03zY5fxz0W9UqOcHMH5fwzZhq+eZZGf2pyCrGUkbdUCvf
Xgxl9A5rXPE6paSIbCZh1tkttRhxeHvMun1rp+WRMvN9FOsdJ483ehEKRdjD4u4x
iGsEqXC4g3u6Hu1TWppKlag/rWT1WTXot7hpwFaOsNFNI8LChIKBnuWlc75S5AKU
xIcTWF1jRSX08L3SIFcLpCaOZ0O3F8128Dt1O4PwicOFe4oGg8vRI5qOE+38/Tj+
VjbXKsTAampybHbdrNd9aaSqt7/5d1xVtEeOgdvqpNMDepJchptobBBF6zDpD1TF
4ZEB61ZPAyG7tw9CwzMdvCylWhDXI/poeQf6M/h52n6DGqC4rShm9SR4u3W7VGWt
Pez+2NG+KWenLn26R8abjj/WBJbYWsKIhgpxWRK3nQbT6D4P4tuDdHgZN3qO5I+s
va5LXwhEoersiRFD72rekatPdtBOkprWPPZUDU4NqbthBTfbzH5oQVlczyHT+OAg
GD/fw4m6aDw1nvHwVLM5HZAOpaSDByqdU9lajXyeARch8/+NXVokGZHmho2hyAOQ
klRP1xrY/p07I4POLkf9DdO5QB1aJyOtRecTQd1971hXO+dR4/CV3UT5SjzwA7Db
WCCdYHuGam5tWyQkqAdV
=fEZ+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat JDBC Connection Pool - Stand Alone Logging

Posted by Chris Keilitz <ke...@gmail.com>.
I'm assuming, once configured properly, the Tomcat JDBC connection pool
would output log messages. Unfortunately, I currently get no console or
file output...even after trying numerous logging.properties changes.

I'm hoping for a little help to understand the proper way to configure a
stand alone usage of Tomcat JDBC.

On Thu, Feb 16, 2017 at 12:58 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Chris,
>
> On 2/16/17 12:26 PM, Chris Keilitz wrote:
> > I've implemented Tomcat JDBC connection pool stand-alone, outside
> > of Tomcat or any app server or container and cannot get the Juli
> > logging working - console or file.   The connection pool works
> > great, but I cannot get the logging going.  I've added
> > CATALINA_HOME to the local directory and have added
> > logging.properties file to the local lib and .conf directories,
> > but still cannot get it to work.
> >
> > I know I'm missing something....hoping one of you can me understand
> > what I'm doing wrong, could try.
>
> When you say that the logging doesn't work, what exactly do you mean?
>
> "Adding CATALINA_HOME to the local directory" doesn't clarify anything.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYpehVAAoJEBzwKT+lPKRYRIIQAL252B1PA+RdmD0kvxi4XGQw
> 1nkfbUpLy3qnZlejj4AMxNZCmNsgxzSVKsuseZXSltiCvsidbuS1VJb+aZ6qI/mC
> FaDdrORqA5MJ5JQxCBKF0KHNvm4/P8+7XLW7S0m+CCSUsJ6S4yUfq8soV+giM6vD
> I3tEMfQscMnkj3wTzWqKKwY4rs6YJ+ILerwclGmMB1rtpO9lwGFBTj2p2M0NwPav
> 9P7LESiUtZGaJMxlS+QFJW+u8xPqQTkQV2xf5ZVbeMZfKqtD14FWrgMzrlRyo27P
> 0IhK1qs2I1EdWzPT7O2xEWpcKC9b6P2+su5YIjS4xwDOF9dsSBZfBLgKXhrm8gDf
> JI+d0xgC80PzDZfQwv/Spo0J9U4sGPUp9+tTRjI4Ub8M8z4xG/gssNw7eG8RCOfU
> NYIK/POB9QPTukUKyEPMXr/DYC7W3b0RP0yjH/yk+hcp3H3Iok/4GVoey8ydhYlT
> fI5P7oq1FNXFVoupMEv77eqlzCc6V7CU0idMhjnSjM5Zoio9r+kbONg5oHDBlSDA
> yXbPcDPORr+qux6hf73HK8kNH5ae059aF9T8lGC+uW5EyY4YAgQfrhle/3xk+Jub
> sGeM8gpVt9eozlNFyZ4LqTXXNtBHzpw5LCTQa1TWS8UQm703+/0DxZmf0EgZwEn5
> pN0ov1UkJ4tcT7DA7E0w
> =Xqes
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat JDBC Connection Pool - Stand Alone Logging

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chris,

On 2/16/17 12:26 PM, Chris Keilitz wrote:
> I've implemented Tomcat JDBC connection pool stand-alone, outside
> of Tomcat or any app server or container and cannot get the Juli
> logging working - console or file.   The connection pool works
> great, but I cannot get the logging going.  I've added
> CATALINA_HOME to the local directory and have added
> logging.properties file to the local lib and .conf directories,
> but still cannot get it to work.
> 
> I know I'm missing something....hoping one of you can me understand
> what I'm doing wrong, could try.

When you say that the logging doesn't work, what exactly do you mean?

"Adding CATALINA_HOME to the local directory" doesn't clarify anything.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYpehVAAoJEBzwKT+lPKRYRIIQAL252B1PA+RdmD0kvxi4XGQw
1nkfbUpLy3qnZlejj4AMxNZCmNsgxzSVKsuseZXSltiCvsidbuS1VJb+aZ6qI/mC
FaDdrORqA5MJ5JQxCBKF0KHNvm4/P8+7XLW7S0m+CCSUsJ6S4yUfq8soV+giM6vD
I3tEMfQscMnkj3wTzWqKKwY4rs6YJ+ILerwclGmMB1rtpO9lwGFBTj2p2M0NwPav
9P7LESiUtZGaJMxlS+QFJW+u8xPqQTkQV2xf5ZVbeMZfKqtD14FWrgMzrlRyo27P
0IhK1qs2I1EdWzPT7O2xEWpcKC9b6P2+su5YIjS4xwDOF9dsSBZfBLgKXhrm8gDf
JI+d0xgC80PzDZfQwv/Spo0J9U4sGPUp9+tTRjI4Ub8M8z4xG/gssNw7eG8RCOfU
NYIK/POB9QPTukUKyEPMXr/DYC7W3b0RP0yjH/yk+hcp3H3Iok/4GVoey8ydhYlT
fI5P7oq1FNXFVoupMEv77eqlzCc6V7CU0idMhjnSjM5Zoio9r+kbONg5oHDBlSDA
yXbPcDPORr+qux6hf73HK8kNH5ae059aF9T8lGC+uW5EyY4YAgQfrhle/3xk+Jub
sGeM8gpVt9eozlNFyZ4LqTXXNtBHzpw5LCTQa1TWS8UQm703+/0DxZmf0EgZwEn5
pN0ov1UkJ4tcT7DA7E0w
=Xqes
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat JDBC Connection Pool - Stand Alone Logging

Posted by Mark Thomas <ma...@apache.org>.
On 16 February 2017 17:26:18 GMT+00:00, Chris Keilitz <ke...@gmail.com> wrote:
>I've implemented Tomcat JDBC connection pool stand-alone, outside of
>Tomcat
>or any app server or container and cannot get the Juli logging working
>-
>console or file.   The connection pool works great, but I cannot get
>the
>logging going.  I've added CATALINA_HOME to the local directory and
>have
>added logging.properties file to the local lib and .conf directories,
>but
>still cannot get it to work.
>
>I know I'm missing something....hoping one of you can me understand
>what
>I'm doing wrong, could try.

Have you set the custom LogManager? Set the Tomcat startup scripts for examples.

Without the custom LogManager the properties file needs to use the standard java.util.logging format rather than Tomcat custom extensions.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org