2

We are using a 3rd party library that in turn depends on jna. We have the jna.debug_load=true set but we don't see the related logs anywhere. Even after launching our program via cmd prompt and directing the console logs to a file the logs are not to be seen. Not much documentation around this so please help.

Is there a way to get them to show up on our application logs(we use log4j 1.2.x).

Specifically we want to know where it finds jnidispatch.dll

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
Chetya
  • 1,267
  • 1
  • 17
  • 31

1 Answers1

2

The jna.debug_load=true setting is for external libraries/DLLs that JNA loads, but not its own native jnidispatch.dll. Per the JNA FAQ you need jna.debug_load.jna for that:

Set the system property jna.debug_load=true, and JNA will print its library search steps to the console. jna.debug_load.jna will trace the search for JNA's own native support.

As for the logging itself, JNA logs to java.util.logging. You'll need to redirect that to log4j using one of the solutions outlined in answers to this question

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63