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

[jira] [Commented] (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=16409601#comment-16409601 ] 

Osma Suominen commented on JENA-1510:
-------------------------------------

Personally I've just used the systemd log via journalctl, but I understand the need to store the log file elsewhere.

Would it make sense to add these settings to the fuseki.service file but commented out, so the administrator can enable them when necessary?

I also noticed (from the SO question you linked to) that newer versions of systemd provide an option that could be used to redirect output directly to files, e.g. like this:

{noformat}
StandardOutput=file:/var/log/fuseki/stderrout.log
StandardError=file:/var/log/fuseki/stderrout.log
{noformat}

But unfortunately this is not supported in the systemd versions that CentOS7 or Ubuntu 16.04 include.

> 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)