Skip to content

Instantly share code, notes, and snippets.

@OpenGamma-Blog
Created September 28, 2012 11:12
Show Gist options
  • Save OpenGamma-Blog/3799224 to your computer and use it in GitHub Desktop.
Save OpenGamma-Blog/3799224 to your computer and use it in GitHub Desktop.
slf4j example 1
public class OGNativeCodeWrapper {
private static Logger log;
static {
try {
System.loadLibrary("NativeLibraryWrapper"); // Load the native library wrapper with symbols to logging routines overridden
} catch (UnsatisfiedLinkError e) {
System.err.println("Cannot find system library.\n" + e);
// handle error
}
initialiseLogger();
log = LoggerFactory.getLogger(OGNativeCodeWrapper.class);
log.info("Logging started for native OGNativeCodeWrapper calls");
}
// native wrapper code goes below...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment