You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2013/01/08 11:28:12 UTC
[jira] [Commented] (JENA-376) Fuseki service script overrides
log4j.configuration setting supplied in JAVA_OPTIONS
[ https://issues.apache.org/jira/browse/JENA-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13546760#comment-13546760 ]
Andy Seaborne commented on JENA-376:
------------------------------------
Proposal:
Change setting JAVA_OPTIONS only if unset.
JAVA_OPTIONS="${JAVA_OPTIONS:--Dlog4j.configuration=log4j.properties -Xmx1200M}"
This is less flexible but, I believe, more in keeping with common practice.
An alternative I see is analyze the preset contents which looks hairy/messy in a shell script.
Splitting out logging control is also possible -- setting Xmx is something users will want to do.
> Fuseki service script overrides log4j.configuration setting supplied in JAVA_OPTIONS
> ------------------------------------------------------------------------------------
>
> Key: JENA-376
> URL: https://issues.apache.org/jira/browse/JENA-376
> Project: Apache Jena
> Issue Type: Bug
> Components: Fuseki
> Affects Versions: Fuseki 0.2.5
> Environment: Ubuntu 12.04
> Reporter: Julian Higman
> Priority: Minor
>
> I'm using the service script to start Fuseki as a service. I'd like to modify some log4j settings by specifying my own log4j.properties file, but I don't seem to be able to specify the location of my properties file.
> I've tried setting the JAVA_OPTIONS environment variable to include the properties file location as a "log4j.configuration" property (with "file:" type) before invoking the script:
> JAVA_OPTIONS="-Dlog4j.configuration=file:/home/jhigman/myProject/config/log4j.properties $JAVA_OPTIONS"
> But the init script adds it's own default location for the log4j.configuration location:
> JAVA_OPTIONS+=("-Dlog4j.configuration=log4j.properties" "-Xmx1200M")
> which overrides whatever I've set in the JAVA_OPTIONS.
> I can't use the classpath to determine where the log4j properties file is because the service script uses the fuseki-server.jar to start the service.
> Could the service script check for the presence of the log4j.configuration option before modifying the JAVA_OPTIONS? Or use another environment variable to allow the log4j.properties file location to be specified?
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira