I would expect the log to appear in the console, e.g powershell if started
from powershell, since the default configuration configures a console
appender, or in a IDE console window, if started from there.

To write to a log file you can add a file appender (
https://logging.apache.org/log4j/2.x/manual/appenders.html#fileappender) to
the  properties file.

I tried adding these lines and they created and started logging to the
defined fileName logfile.

+ appender.file.type = File

+ appender.file.name = FILE

+ appender.file.fileName = fuseki.log

+ appender.file.layout.type = PatternLayout

+ appender.file.layout.pattern = %d{HH:mm:ss} %-5p %-15c{1} :: %m%n



...


+ rootLogger.appenderRef.file.ref = FILE


Best regards,

Øyvind


On Tue, Aug 27, 2024 at 7:09 PM Scott Henninger <[email protected]>
wrote:

> Thanks, Øyvind, Andy, for your responses.  I have a pretty basic
> question.  I have the default settings in log4j2.properties, but see no
> indication that anything is getting logged.  For example. When I look in
> run/logs, it is empty.  Where should logs appear on default and/or how so I
> set logging to write the log to a file?  I am running on Windows with
> Fuseki 5.1.0.
>
> Thanks in advance,
> -- Scott
>
> From: Andy Seaborne <[email protected]>
> Sent: Saturday, August 24, 2024 9:49 AM
> To: [email protected]
> Subject: [EXTERNAL] Re: Configuring logging in Fuseki
>
> CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
>
>
> On 23/08/2024 18:39, Øyvind Gjesdal wrote:
> > Hi Scott,
> >
> > I think you are right. There is more info on logging for fuseki in
> > https://jena.apache.org/documentation/fuseki2/fuseki-logging.html<
> https://jena.apache.org/documentation/fuseki2/fuseki-logging.html> which
> > also contains a link to a default file you can fit to your needs.
> >
> > Best regards,
> > Øyvind
>
> Yes, and in addition, if you want to take complete complete control of
> logging you can configure log4j directly by setting the environment
> variable LOGGING (see the fuskei-server script).
>
> e.g.
>
> export LOGGING="-Dlog4j.configurationFile=file:...."
>
> and use XML or JSON formats.
>
> >
> > On Fri, Aug 23, 2024 at 7:21 PM Scott Henninger <
> [email protected]<mailto:[email protected]>>
> > wrote:
> >
> >> Is it possible to configure logging from the command line for Fuseki? I
> >> found the following link that indicates it looks for the file
> >> log4j2.properties, but I don't see anything about what goes in that
> >> properties Apache Jena - Running Fuseki with UI<
> >>
> https://jena.apache.org/documentation/fuseki2/fuseki-webapp.html#configuring-logging
> <
> https://jena.apache.org/documentation/fuseki2/fuseki-webapp.html#configuring-logging
> >
> >>>
> >>
> >> First of all is it true that configuring logging is a matter of
> including
> >> the log4j2.properties file and if so what should appear in the file to
> set
> >> logging levels?
> >>
> >> Thank you
> >> -- Scott
> >>
> >
>

Reply via email to