|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
A lot of debug logsHi,
When using DBUnit in a JUnit ANT task, and setting logging level to DEBUG, we can quickly get OutOfMemoryError (java heap space). I traced that to be caused by JUnit's ant task that accumulates all logging into a ByteArrayOutputStream, which is only freed when the test finishes its execution. The biggest log producer is DBUnit (by many a few order of magnitude), so I wonder if all these fine grained debug logs are still necessary? This problem actually showed up when we moved to slf4j and logback. We had forgotten to define a config file, thus logback sent DEBUG level logs. We could not see where the OutOfMemoryError came from because the JUnit ant task does not output logs to the console until the test finishes (by default). So all we saw was this memory error. I do not know yet why JUnit task buffers logs like that, but nonetheless, I wonder why there are so many logs in DBUnit. -- Mel T. |
|
|
|
|
|
Re: A lot of debug logsOf course, changing logging for dbunit is what I had to do. But the fact that logback defaults to DEBUG for root logger, and because ant's junit task buffers all logs without displaying them in the console, it was not trivial to figure out that the memory error comes from logging that many log calls coming out of dbunit (i.e. we never get to see those logs before the program crashes). And yes, TRACE would prevent that problem. Regards, Mel T. |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |