Skip to content
nyholku edited this page Oct 31, 2012 · 2 revisions

#Logging

You can turn on the logging by setting the system property purejavacomm.loglevel to a value in the range 0-7.

Turning on the logging will cause PureJavaComm to output progress information to the console.

The default level is 0 at which nothing is output, this is the default level.

Increasing numbers produce progressively more information.

You can set the system parameter in code via:

System.setProperty("purejavacomm.loglevel","6");

or

jtermios.JTermios.JTermiosLogging.setLogLevel(6);

or on the command line when launching an application like this:

java -Dpurejavacomm.loglevel=6 -jar yourapplication.jar

which is handy because you can turn the logging on without touching the application code, especially useful if the source code is not accessible.

At level 1 only critical information is output.

At level 5 every operating system call with parameters and return values are logged.

At level 6 logging info includes the class and line number where is each system call happens.

Clone this wiki locally