You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mikael Pesonen <mi...@lingsoft.fi> on 2018/06/28 11:37:47 UTC

Suppressing SPARQL queries from log

Hi,

we are having trouble with Fuseki log size. Easiest would be to switch 
to WARN level, but response times are quite usefull. So is it possible 
somehow to remove just the queries from INFO level?

Br

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Suppressing SPARQL queries from log

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Sorry I mean these lines

[2018-06-29 17:21:23] Fuseki     INFO  [4] Query = SPARQL query here...

This

log4j.logger.org.apache.jena.sparql=WARN

didnt seem to remove those lines.


On 29.6.2018 16:41, Claude Warren wrote:
> You don't specify exactly which log entries you want to avoid but you can
> do something like:
>
> log4.logger.org.apache.jena.sparql=WARN
>
> would set all the sparql logs to WARN level.  Assuming you are using log4j.
>
> On Fri, Jun 29, 2018 at 12:40 PM, Mikael Pesonen <mikael.pesonen@lingsoft.fi
>> wrote:
>> Thanks for the reply. Our log is going to journald so I think it's
>> compressed already.
>>
>>
>> On 28.6.2018 18:05, Dan Pritts wrote:
>>
>>> Not a direct answer, but it may help you to switch to hourly rotation
>>> instead of daily. Then you can compress the files hourly instead of daily.
>>> As I'm sure you've noticed, they compress quite well.
>>>
>>> I use the following in log4j.properties.
>>>
>>> # http://www.codejava.net/coding/configure-log4j-for-creating-
>>> daily-rolling-log-files
>>> # also see https://github.com/epimorphics/sedgemoor-data/blob/master/
>>> package/fuseki-config/log4j.properties
>>> log4j.rootLogger=INFO,FusekiFileLog
>>> log4j.appender.FusekiFileLog=org.apache.log4j.DailyRollingFileAppender
>>> log4j.appender.FusekiFileLog.File=/var/log/fuseki/fuseki.log
>>> #log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd
>>> # -HH does an hourly rollover
>>> log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd-HH
>>> log4j.appender.FusekiFileLog.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.FusekiFileLog.layout.ConversionPattern=[%d{yyyyMMdd-HH:mm:ss}]
>>> %-10c{1} %-5p %m%n
>>>
>>>
>>>
>>>
>>>
>>> Mikael Pesonen wrote on 6/28/18 7:37 AM:
>>>
>>>> Hi,
>>>>
>>>> we are having trouble with Fuseki log size. Easiest would be to switch
>>>> to WARN level, but response times are quite usefull. So is it possible
>>>> somehow to remove just the queries from INFO level?
>>>>
>>>> Br
>>>>
>>>>
>>> --
>>> Dan Pritts
>>> ICPSR Computing & Network Services
>>> University of Michigan
>>> <https://www.postbox-inc.com>
>>>
>> --
>> Lingsoft - 30 years of Leading Language Management
>>
>> www.lingsoft.fi
>>
>> Speech Applications - Language Management - Translation - Reader's and
>> Writer's Tools - Text Tools - E-books and M-books
>>
>> Mikael Pesonen
>> System Engineer
>>
>> e-mail: mikael.pesonen@lingsoft.fi
>> Tel. +358 2 27
>> <https://maps.google.com/?q=Tel.+%2B358+2+27&entry=gmail&source=g>9 3300
>>
>> Time zone: GMT+2
>>
>> Helsinki Office
>> Eteläranta 10
>> FI-00130 Helsinki
>> FINLAND
>>
>> Turku Office
>> Kauppiaskatu 5 A
>> FI-20100 Turku
>> FINLAND
>>
>>
>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Suppressing SPARQL queries from log

Posted by Claude Warren <cl...@xenei.com>.
You don't specify exactly which log entries you want to avoid but you can
do something like:

log4.logger.org.apache.jena.sparql=WARN

would set all the sparql logs to WARN level.  Assuming you are using log4j.

On Fri, Jun 29, 2018 at 12:40 PM, Mikael Pesonen <mikael.pesonen@lingsoft.fi
> wrote:

>
> Thanks for the reply. Our log is going to journald so I think it's
> compressed already.
>
>
> On 28.6.2018 18:05, Dan Pritts wrote:
>
>> Not a direct answer, but it may help you to switch to hourly rotation
>> instead of daily. Then you can compress the files hourly instead of daily.
>> As I'm sure you've noticed, they compress quite well.
>>
>> I use the following in log4j.properties.
>>
>> # http://www.codejava.net/coding/configure-log4j-for-creating-
>> daily-rolling-log-files
>> # also see https://github.com/epimorphics/sedgemoor-data/blob/master/
>> package/fuseki-config/log4j.properties
>> log4j.rootLogger=INFO,FusekiFileLog
>> log4j.appender.FusekiFileLog=org.apache.log4j.DailyRollingFileAppender
>> log4j.appender.FusekiFileLog.File=/var/log/fuseki/fuseki.log
>> #log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd
>> # -HH does an hourly rollover
>> log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd-HH
>> log4j.appender.FusekiFileLog.layout=org.apache.log4j.PatternLayout
>> log4j.appender.FusekiFileLog.layout.ConversionPattern=[%d{yyyyMMdd-HH:mm:ss}]
>> %-10c{1} %-5p %m%n
>>
>>
>>
>>
>>
>> Mikael Pesonen wrote on 6/28/18 7:37 AM:
>>
>>>
>>> Hi,
>>>
>>> we are having trouble with Fuseki log size. Easiest would be to switch
>>> to WARN level, but response times are quite usefull. So is it possible
>>> somehow to remove just the queries from INFO level?
>>>
>>> Br
>>>
>>>
>> --
>> Dan Pritts
>> ICPSR Computing & Network Services
>> University of Michigan
>> <https://www.postbox-inc.com>
>>
>
> --
> Lingsoft - 30 years of Leading Language Management
>
> www.lingsoft.fi
>
> Speech Applications - Language Management - Translation - Reader's and
> Writer's Tools - Text Tools - E-books and M-books
>
> Mikael Pesonen
> System Engineer
>
> e-mail: mikael.pesonen@lingsoft.fi
> Tel. +358 2 27
> <https://maps.google.com/?q=Tel.+%2B358+2+27&entry=gmail&source=g>9 3300
>
> Time zone: GMT+2
>
> Helsinki Office
> Eteläranta 10
> FI-00130 Helsinki
> FINLAND
>
> Turku Office
> Kauppiaskatu 5 A
> FI-20100 Turku
> FINLAND
>
>


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Re: Suppressing SPARQL queries from log

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Thanks for the reply. Our log is going to journald so I think it's 
compressed already.

On 28.6.2018 18:05, Dan Pritts wrote:
> Not a direct answer, but it may help you to switch to hourly rotation 
> instead of daily. Then you can compress the files hourly instead of 
> daily.  As I'm sure you've noticed, they compress quite well.
>
> I use the following in log4j.properties.
>
> # 
> http://www.codejava.net/coding/configure-log4j-for-creating-daily-rolling-log-files
> # also see 
> https://github.com/epimorphics/sedgemoor-data/blob/master/package/fuseki-config/log4j.properties
> log4j.rootLogger=INFO,FusekiFileLog
> log4j.appender.FusekiFileLog=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.FusekiFileLog.File=/var/log/fuseki/fuseki.log
> #log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd
> # -HH does an hourly rollover
> log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd-HH
> log4j.appender.FusekiFileLog.layout=org.apache.log4j.PatternLayout
> log4j.appender.FusekiFileLog.layout.ConversionPattern=[%d{yyyyMMdd-HH:mm:ss}] 
> %-10c{1} %-5p %m%n
>
>
>
>
>
> Mikael Pesonen wrote on 6/28/18 7:37 AM:
>>
>> Hi,
>>
>> we are having trouble with Fuseki log size. Easiest would be to 
>> switch to WARN level, but response times are quite usefull. So is it 
>> possible somehow to remove just the queries from INFO level?
>>
>> Br
>>
>
> -- 
> Dan Pritts
> ICPSR Computing & Network Services
> University of Michigan
> <https://www.postbox-inc.com>

-- 
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.pesonen@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND


Re: Suppressing SPARQL queries from log

Posted by Dan Pritts <da...@umich.edu>.
Not a direct answer, but it may help you to switch to hourly rotation 
instead of daily. Then you can compress the files hourly instead of 
daily.  As I'm sure you've noticed, they compress quite well.

I use the following in log4j.properties.

# 
http://www.codejava.net/coding/configure-log4j-for-creating-daily-rolling-log-files
# also see 
https://github.com/epimorphics/sedgemoor-data/blob/master/package/fuseki-config/log4j.properties
log4j.rootLogger=INFO,FusekiFileLog
log4j.appender.FusekiFileLog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FusekiFileLog.File=/var/log/fuseki/fuseki.log
#log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd
# -HH does an hourly rollover
log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.FusekiFileLog.layout=org.apache.log4j.PatternLayout
log4j.appender.FusekiFileLog.layout.ConversionPattern=[%d{yyyyMMdd-HH:mm:ss}] 
%-10c{1} %-5p %m%n





Mikael Pesonen wrote on 6/28/18 7:37 AM:
>
> Hi,
>
> we are having trouble with Fuseki log size. Easiest would be to switch 
> to WARN level, but response times are quite usefull. So is it possible 
> somehow to remove just the queries from INFO level?
>
> Br
>

-- 
Dan Pritts
ICPSR Computing & Network Services
University of Michigan
<https://www.postbox-inc.com>