Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change trace file in H2

Tags:

h2

My application uses H2 but already has a log file (ex: abc.log)

Now, I'm trying to make even the H2 to write logs/errors to that file (abc.log) so if something goes wrong an user has only 1 file to send to me (not abc.log AND abc.db.trace file)

Is there a way to achieve that?

like image 652
Alex Avatar asked Jan 02 '13 14:01

Alex


1 Answers

You can configure H2 to use SL4FJ as follows:

jdbc:h2:~/test;TRACE_LEVEL_FILE=4

The logger name is h2database.

like image 171
Thomas Mueller Avatar answered Oct 04 '22 17:10

Thomas Mueller