Setting the log level for a Project doesn't supress all log messages

Issue #78 resolved
Andreas M created an issue

When creating a Project and passing an OPALLogger instance, it doesn't filter all messages.

Example:

val l = new ConsoleOPALLogger(true, Error)
val p = Project(new java.io.File("/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/"), l)

In particular, the following messages still appear even if the minLogLevel is set to Error:

[info][project configuration] information about synthesized class files is removed
[info][project configuration] Java 8 lambda expressions are rewritten
[info][project configuration] Java 8 lambda expressions rewrites are not logged
[info][project configuration] information about synthesized class files is removed
[info][project configuration] Java 8 lambda expressions are rewritten
[info][project configuration] Java 8 lambda expressions rewrites are not logged
[warn][OPAL] the property org.opalj.threads.CPUBoundTasks is unspecified
[info][OPAL] using 4 thread(s) for CPU bound tasks (can be changed by setting the system property org.opalj.threads.CPUBoundTasks; the number should be equal to the number of physical  not hyperthreaded  cores)
[warn][OPAL] the property org.opalj.threads.IOBoundTasks is unspecified
[info][OPAL] using at most 8 thread(s) for IO bound tasks (can be changed by setting the system property org.opalj.threads.IOBoundTasks; the number should be betweeen 1 and 2 times the number of (hyperthreaded) cores)

Comments (7)

  1. Andreas M reporter

    I have added a workaround by updating the global logger: OPALLogger.updateLogger(GlobalLogContext, new ConsoleOPALLogger(true, Error))

  2. Michael Reif

    That is exactly was has been done in the stackoverflow post. I would be glad about an upvote ;-)

  3. Michael Eichberg repo owner
    • edited description
    • changed status to resolved

    I've decided to close this issue, because we currently always have to Loggers - one for project specific issues and one for general - project independent - issues. Hence, if we want to suppress all warnings, both loggers have to configured and how to do this is now documented by this thread and also the Stackoverflow Post.

  4. Log in to comment