You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Joachim Neubert (JIRA)" <ji...@apache.org> on 2018/03/22 16:49:00 UTC

[jira] [Comment Edited] (JENA-1510) Add logging to systemd unit file for Fuseki

    [ https://issues.apache.org/jira/browse/JENA-1510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409645#comment-16409645 ] 

Joachim Neubert edited comment on JENA-1510 at 3/22/18 4:48 PM:
----------------------------------------------------------------

Yes, commented-out settings make sense. Perhaps, the section could look like this:
{code:java}
### By default, the service logs to journalctl only.
### If additional logging to a file is required, uncomment the following three lines
# StandardOutput=syslog
# StandardError=syslog
# SyslogIdentifier=fuseki
### This logs to syslog. If, e.g., rsyslogd is used, you can provide a file
### /etc/rsyslog.d/fuseki.conf, consisting of the following two lines (uncommented)
### if $programname == 'fuseki' then /var/log/fuseki/stderrout.log
### if $programname == 'fuseki' then stop
{code}
In only a few years from now, that probably can be replaced with the more straightforward way you mentioned above.


was (Author: jneubert):
Yes, commented-out settings make sense. Perhaps, the section could look like this:
{code}
### By default, the service logs to journalctl only.
### If additional logging to a file is required, uncomment the following three lines
# StandardOutput=syslog
# StandardError=syslog
# SyslogIdentifier=fuseki
### and provide a file /etc/rsyslog.d/fuseki.conf, consisting of the following two lines (uncommented)
### if $programname == 'fuseki' then /var/log/fuseki/stderrout.log
### if $programname == 'fuseki' then stop
{code}
In only a few years from now, that probably can be replaced with the more straightforward way you mentioned above.

> Add logging to systemd unit file for Fuseki
> -------------------------------------------
>
>                 Key: JENA-1510
>                 URL: https://issues.apache.org/jira/browse/JENA-1510
>             Project: Apache Jena
>          Issue Type: Brainstorming
>          Components: Fuseki
>            Reporter: Joachim Neubert
>            Priority: Minor
>
> Currently, the fuseki.service logs to journalctl, which is the systemd default mechanism, and not to any fuseki-specific log file. Since I want to have (and probably keep) such files, I've followed a [solution on stackoverflow|https://stackoverflow.com/questions/37585758/how-to-redirect-output-of-systemd-service-to-a-file] and added 
> {code}
> StandardOutput=syslog
> StandardError=syslog
> SyslogIdentifier=fuseki
> {code}
> which logs to rsyslog. A /etc/rsyslog.d/fuseki.conf file then defines the actual log location:
> {code}
> if $programname == 'fuseki' then /var/log/fuseki/stderrout.log
> if $programname == 'fuseki' then stop
> {code}
> which worked nicely. I suppose it could be useful for others, too. What do you think?
> Ping [~osma] who created the systemd unit file (JENA-1501).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)