: it sorted. I'm using a DirectSolrConnection embedded in a JRuby : application, and everything works great, except I can't seem to get it to do : anything except log to the console. I've tried pointing : 'java.util.logging.config.file' to a properties file, as well as specifying
how have you tried pointing it at a properties file? it's a system property that needs to be set before tany code attempts to load any of the logging related classes, so in JRuby you may have to do soemthing special to specify it before JRUby loads the JVM (normally it can only be set on the command line when executing java, System.setProperty doesn't work (in any JVM) worst case scenerio, you can modify the default logging.properties file that is in the JVM JRuby runs. : What I'd like to do is programmatically direct the Solr logs to a logfile, : so that I can have my app start up, parse its config, and throw the Solr : logs where they need to go based on that. : : So, I don't suppose anybody has a code snippet (in Java) that sets up SLF4J : for Solr logging (and that doesn't reference an external properties file)? SLF4J is just a proxy API, it doesn't know anything baout log files or log levels or log filtering ... you can programaticly change the JUL Logging using the LogManager API... http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/LogManager.html http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/LogManager.html#getLogger(java.lang.String) http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Logger.html#addHandler(java.util.logging.Handler) http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/FileHandler.html -Hoss