# Tomcat Logging Levels / DHIS2

**URL:** <https://community.dhis2.org/t/tomcat-logging-levels-dhis2/3316>\
**Category:** Support - Assistance technique\
**Created:** [10 March 2016 12:25 UTC](https://community.dhis2.org/t/tomcat-logging-levels-dhis2/3316 "2016-03-10T12:25:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Phillips](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/j/97f17d/32.png) [@Jason\_Phillips](https://community.dhis2.org/u/Jason_Phillips)\
**Post date:** [10 March 2016 12:25 UTC](https://community.dhis2.org/t/tomcat-logging-levels-dhis2/3316/1 "2016-03-10T12:25:36Z")

</div>

Hi all,

Can anyone provide me with details of how to make changes to DHIS2 Tomcat logging levels?

I have tried editing logging.properties in [BASE]/conf, and turning off logging (and various other attempts at different levels, such as SEVERE, WARNING, etc) using the folling settings:

![image](https://dhis2.b-cdn.net/uploads/default/original/1X/c20b484732d529a6cd8e3fe9395b957770e079af.png)

---

<div class="post-metadata">

**Author:** ![Lars](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/lars/32/34166_2.png) [@Lars](https://community.dhis2.org/u/Lars)\
**Post date:** [10 March 2016 12:57 UTC](https://community.dhis2.org/t/tomcat-logging-levels-dhis2/3316/2 "2016-03-10T12:57:39Z")

</div>

Hi Jason,

did you look at this section in the docs?

[http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html](http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html)

regards,

Lars

![image](https://dhis2.b-cdn.net/uploads/default/original/1X/c20b484732d529a6cd8e3fe9395b957770e079af.png)

> **···**
>
> On Thu, Mar 10, 2016 at 1:25 PM, Jason Phillips [jason@hisp.org](mailto:jason@hisp.org) wrote:
> 
> > Hi all,
> 
> > 
> 
> > Can anyone provide me with details of how to make changes to DHIS2 Tomcat logging levels?
> 
> > 
> 
> > I have tried editing logging.properties in [BASE]/conf, and turning off logging (and various other attempts at different levels, such as SEVERE, WARNING, etc) using the folling settings:
> 
> > 
> 
> > * * *
> 
> > 1catalina.org.apache.juli.FileHandler.level = OFF
> 
> > 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> > 1catalina.org.apache.juli.FileHandler.prefix = catalina.
> 
> > 
> 
> > 2localhost.org.apache.juli.FileHandler.level = OFF
> 
> > 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> > 2localhost.org.apache.juli.FileHandler.prefix = localhost.
> 
> > 
> 
> > java.util.logging.ConsoleHandler.level = OFF
> 
> > java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
> 
> > 
> 
> > …
> 
> > 
> 
> > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = OFF
> 
> > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
> 
> > 
> 
> > * * *
> 
> > And still no joy – DHIS2 logs away, regardless. I have set the levels to alternating variants of SEVERE, FINE, FINEST, WARNING and others to no discernible effect.
> 
> > Any info would be most appreciated.
> 
> > 
> 
> > Also, while on the subject, I notice that logging duplication appears to be happening in the [BASE]/conf/logs folder, albeit separated into different files based on function/origin.
> 
> > Are those logs affected by the same settings/properties, and how does one manipulate their levels, in addition to or separately from, the standard catalina.out?
> 
> > 
> 
> > Kind Regards,
> 
> > **Jason Phillips**
> 
> > **Information Systems / Infrastructure** \*\*  
> > Health Information Systems Program  
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\*\*
> 
> > eMail: [jason@hisp.org](mailto:jason@hisp.org)  
> > Landline: +27 21 712 0170  
> > Mobile: +27 72 973 7250  
> > Skype: jason.n.phillips
> 
> > This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.
> 
> > _This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer._
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
> > 
> > Post to : [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> –
> 
> Lars Helge Øverland
> 
> Lead developer, DHIS 2
> 
> University of Oslo
> 
> Skype: larshelgeoverland
> 
> [http://www.dhis2.org](https://www.dhis2.org/)

---

<div class="post-metadata">

**Author:** ![Jason\_Phillips](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/j/97f17d/32.png) [@Jason\_Phillips](https://community.dhis2.org/u/Jason_Phillips)\
**Post date:** [10 March 2016 14:21 UTC](https://community.dhis2.org/t/tomcat-logging-levels-dhis2/3316/3 "2016-03-10T14:21:05Z")

</div>

Hi Lars,

Yep – and unless I’ve dropped a few IQ points, I can’t see where it tell you how to adjust the logging levels.

It explains the extra logging I referred to, but doesn’t tell me how to change anything in the default logging, unless I am being daft?

I don’t want to use log4j, or anything else; I just want to stop the thing from logging authentications…

Am I being daft?

Best,

Jason.

![image](https://dhis2.b-cdn.net/uploads/default/original/1X/c20b484732d529a6cd8e3fe9395b957770e079af.png)

> **···**
>
> Hi Jason,
> 
> did you look at this section in the docs?
> 
> [http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html](http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html)
> 
> regards,
> 
> Lars
> 
> On Thu, Mar 10, 2016 at 1:25 PM, Jason Phillips [jason@hisp.org](mailto:jason@hisp.org) wrote:
> 
> Hi all,
> 
> Can anyone provide me with details of how to make changes to DHIS2 Tomcat logging levels?
> 
> I have tried editing logging.properties in [BASE]/conf, and turning off logging (and various other attempts at different levels, such as SEVERE, WARNING, etc) using the folling settings:
> 
> * * *
> 
> 1catalina.org.apache.juli.FileHandler.level = OFF
> 
> 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> 1catalina.org.apache.juli.FileHandler.prefix = catalina.
> 
> 2localhost.org.apache.juli.FileHandler.level = OFF
> 
> 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> 2localhost.org.apache.juli.FileHandler.prefix = localhost.
> 
> java.util.logging.ConsoleHandler.level = OFF
> 
> java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
> 
> …
> 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = OFF
> 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
> 
> * * *
> 
> And still no joy – DHIS2 logs away, regardless. I have set the levels to alternating variants of SEVERE, FINE, FINEST, WARNING and others to no discernible effect.
> 
> Any info would be most appreciated.
> 
> Also, while on the subject, I notice that logging duplication appears to be happening in the [BASE]/conf/logs folder, albeit separated into different files based on function/origin.
> 
> Are those logs affected by the same settings/properties, and how does one manipulate their levels, in addition to or separately from, the standard catalina.out?
> 
> Kind Regards,
> 
> **Jason Phillips**
> 
> **Information Systems / Infrastructure** \*\*  
> Health Information Systems Program  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\*\*
> 
> eMail: [jason@hisp.org](mailto:jason@hisp.org)  
> Landline: +27 21 712 0170  
> Mobile: +27 72 973 7250  
> Skype: jason.n.phillips
> 
> This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.
> 
> _This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer._
> 
> * * *
> 
> Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> Post to : [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)  
> Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> –
> 
> Lars Helge Øverland
> 
> Lead developer, DHIS 2
> 
> University of Oslo
> 
> Skype: larshelgeoverland
> 
> [http://www.dhis2.org](https://www.dhis2.org/)

---

<div class="post-metadata">

**Author:** ![bobj](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/bobj/32/33033_2.png) [@bobj](https://community.dhis2.org/u/bobj)\
**Post date:** [10 March 2016 14:29 UTC](https://community.dhis2.org/t/tomcat-logging-levels-dhis2/3316/4 "2016-03-10T14:29:28Z")

</div>

Not daft (well not completely daft). You cannot change the default logging configuration. It is set programmatically in java.

Your option is to create a custom log4j configuration as per the documentation.

In production you might want to do this anyway, rather than rely on the baked in configuration. Some time ago I produced a log4j configuration file which mimiced the behaviour of the hard coded configuration but I lost it - I know, I should have committed it somewhere but I didn’t. Now I will (eventually) have to do it again.

(An alternative future approach might be to allow some of these things to be fine tuned in the settings through the ui but this is currently not possible)

![image](https://dhis2.b-cdn.net/uploads/default/original/1X/c20b484732d529a6cd8e3fe9395b957770e079af.png)

> **···**
>
> On 10 March 2016 at 14:21, Jason Phillips [jason@hisp.org](mailto:jason@hisp.org) wrote:
> 
> > Hi Lars,
> 
> > 
> 
> > Yep – and unless I’ve dropped a few IQ points, I can’t see where it tell you how to adjust the logging levels.
> 
> > It explains the extra logging I referred to, but doesn’t tell me how to change anything in the default logging, unless I am being daft?
> 
> > I don’t want to use log4j, or anything else; I just want to stop the thing from logging authentications…
> 
> > 
> 
> > Am I being daft?
> 
> > 
> 
> > Best,
> 
> > Jason.
> 
> > 
> 
> > 
> 
> > **From:** Lars Helge Øverland [[mailto:lars@dhis2.org](mailto:lars@dhis2.org)]  
> > **Sent:** Thursday, 10 March 2016 2:58 PM  
> > **To:** Jason Phillips  
> > **Cc:** DHIS 2 Users list  
> > **Subject:** Re: [Dhis2-users] Tomcat Logging Levels / DHIS2
> 
> > Hi Jason,
> 
> > did you look at this section in the docs?
> 
> > [http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html](http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html)
> 
> > regards,
> 
> > Lars
> 
> > On Thu, Mar 10, 2016 at 1:25 PM, Jason Phillips [jason@hisp.org](mailto:jason@hisp.org) wrote:
> 
> > Hi all,
> 
> > 
> 
> > Can anyone provide me with details of how to make changes to DHIS2 Tomcat logging levels?
> 
> > 
> 
> > I have tried editing logging.properties in [BASE]/conf, and turning off logging (and various other attempts at different levels, such as SEVERE, WARNING, etc) using the folling settings:
> 
> > 
> 
> > * * *
> 
> > 1catalina.org.apache.juli.FileHandler.level = OFF
> 
> > 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> > 1catalina.org.apache.juli.FileHandler.prefix = catalina.
> 
> > 
> 
> > 2localhost.org.apache.juli.FileHandler.level = OFF
> 
> > 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> > 2localhost.org.apache.juli.FileHandler.prefix = localhost.
> 
> > 
> 
> > java.util.logging.ConsoleHandler.level = OFF
> 
> > java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
> 
> > 
> 
> > …
> 
> > 
> 
> > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = OFF
> 
> > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
> 
> > 
> 
> > * * *
> 
> > And still no joy – DHIS2 logs away, regardless. I have set the levels to alternating variants of SEVERE, FINE, FINEST, WARNING and others to no discernible effect.
> 
> > Any info would be most appreciated.
> 
> > 
> 
> > Also, while on the subject, I notice that logging duplication appears to be happening in the [BASE]/conf/logs folder, albeit separated into different files based on function/origin.
> 
> > Are those logs affected by the same settings/properties, and how does one manipulate their levels, in addition to or separately from, the standard catalina.out?
> 
> > 
> 
> > Kind Regards,
> 
> > **Jason Phillips**
> 
> > **Information Systems / Infrastructure** \*\*  
> > Health Information Systems Program  
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\*\*
> 
> > eMail: [jason@hisp.org](mailto:jason@hisp.org)  
> > Landline: +27 21 712 0170  
> > Mobile: +27 72 973 7250  
> > Skype: jason.n.phillips
> 
> > This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.
> 
> > _This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer._
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> > Post to : [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)  
> > Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> > 
> 
> > –
> 
> > Lars Helge Øverland
> 
> > Lead developer, DHIS 2
> 
> > University of Oslo
> 
> > Skype: larshelgeoverland
> 
> > [http://www.dhis2.org](https://www.dhis2.org/)
> 
> > _This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer._
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
> > 
> > Post to : [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![Lars](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/lars/32/34166_2.png) [@Lars](https://community.dhis2.org/u/Lars)\
**Post date:** [10 March 2016 14:33 UTC](https://community.dhis2.org/t/tomcat-logging-levels-dhis2/3316/5 "2016-03-10T14:33:32Z")

</div>

Hi Jason,

we do use log4j for logging so you need to use the log4j configuration syntax to modify the behavior.

You can do this to raise the log level for the spring authentication, try something like this in your log4j.properties:

springframework.security.web.authentication = ERROR

Lars

![image](https://dhis2.b-cdn.net/uploads/default/original/1X/c20b484732d529a6cd8e3fe9395b957770e079af.png)

> **···**
>
> On Thu, Mar 10, 2016 at 3:29 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> 
> > Not daft (well not completely daft). You cannot change the default logging configuration. It is set programmatically in java.
> 
> > Your option is to create a custom log4j configuration as per the documentation.
> 
> > 
> 
> > In production you might want to do this anyway, rather than rely on the baked in configuration. Some time ago I produced a log4j configuration file which mimiced the behaviour of the hard coded configuration but I lost it - I know, I should have committed it somewhere but I didn’t. Now I will (eventually) have to do it again.
> 
> > 
> 
> > (An alternative future approach might be to allow some of these things to be fine tuned in the settings through the ui but this is currently not possible)
> 
> –
> 
> On 10 March 2016 at 14:21, Jason Phillips [jason@hisp.org](mailto:jason@hisp.org) wrote:
> 
> > Hi Lars,
> 
> > 
> 
> > Yep – and unless I’ve dropped a few IQ points, I can’t see where it tell you how to adjust the logging levels.
> 
> > It explains the extra logging I referred to, but doesn’t tell me how to change anything in the default logging, unless I am being daft?
> 
> > I don’t want to use log4j, or anything else; I just want to stop the thing from logging authentications…
> 
> > 
> 
> > Am I being daft?
> 
> > 
> 
> > Best,
> 
> > Jason.
> 
> > 
> 
> > 
> 
> > **From:** Lars Helge Øverland [[mailto:lars@dhis2.org](mailto:lars@dhis2.org)]  
> > **Sent:** Thursday, 10 March 2016 2:58 PM  
> > **To:** Jason Phillips  
> > **Cc:** DHIS 2 Users list  
> > **Subject:** Re: [Dhis2-users] Tomcat Logging Levels / DHIS2
> 
> > Hi Jason,
> 
> > did you look at this section in the docs?
> 
> > [http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html](http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html)
> 
> > regards,
> 
> > Lars
> 
> > On Thu, Mar 10, 2016 at 1:25 PM, Jason Phillips [jason@hisp.org](mailto:jason@hisp.org) wrote:
> 
> > Hi all,
> 
> > 
> 
> > Can anyone provide me with details of how to make changes to DHIS2 Tomcat logging levels?
> 
> > 
> 
> > I have tried editing logging.properties in [BASE]/conf, and turning off logging (and various other attempts at different levels, such as SEVERE, WARNING, etc) using the folling settings:
> 
> > 
> 
> > * * *
> 
> > 1catalina.org.apache.juli.FileHandler.level = OFF
> 
> > 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> > 1catalina.org.apache.juli.FileHandler.prefix = catalina.
> 
> > 
> 
> > 2localhost.org.apache.juli.FileHandler.level = OFF
> 
> > 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> > 2localhost.org.apache.juli.FileHandler.prefix = localhost.
> 
> > 
> 
> > java.util.logging.ConsoleHandler.level = OFF
> 
> > java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
> 
> > 
> 
> > …
> 
> > 
> 
> > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = OFF
> 
> > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
> 
> > 
> 
> > * * *
> 
> > And still no joy – DHIS2 logs away, regardless. I have set the levels to alternating variants of SEVERE, FINE, FINEST, WARNING and others to no discernible effect.
> 
> > Any info would be most appreciated.
> 
> > 
> 
> > Also, while on the subject, I notice that logging duplication appears to be happening in the [BASE]/conf/logs folder, albeit separated into different files based on function/origin.
> 
> > Are those logs affected by the same settings/properties, and how does one manipulate their levels, in addition to or separately from, the standard catalina.out?
> 
> > 
> 
> > Kind Regards,
> 
> > **Jason Phillips**
> 
> > **Information Systems / Infrastructure** \*\*  
> > Health Information Systems Program  
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\*\*
> 
> > eMail: [jason@hisp.org](mailto:jason@hisp.org)  
> > Landline: +27 21 712 0170  
> > Mobile: +27 72 973 7250  
> > Skype: jason.n.phillips
> 
> > This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.
> 
> > _This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer._
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> > Post to : [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)  
> > Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> > 
> 
> > –
> 
> > Lars Helge Øverland
> 
> > Lead developer, DHIS 2
> 
> > University of Oslo
> 
> > Skype: larshelgeoverland
> 
> > [http://www.dhis2.org](https://www.dhis2.org/)
> 
> > _This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer._
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
> > 
> > Post to : [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> Lars Helge Øverland
> 
> Lead developer, DHIS 2
> 
> University of Oslo
> 
> Skype: larshelgeoverland
> 
> [http://www.dhis2.org](https://www.dhis2.org/)

---

<div class="post-metadata">

**Author:** ![Jason\_Phillips](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/j/97f17d/32.png) [@Jason\_Phillips](https://community.dhis2.org/u/Jason_Phillips)\
**Post date:** [10 March 2016 15:06 UTC](https://community.dhis2.org/t/tomcat-logging-levels-dhis2/3316/6 "2016-03-10T15:06:47Z")

</div>

Aha,

Now it all makes sense…

I did manage to break the logger altogether, which had the same effect as switching it off:

I changed the line below to read:

log4j.rootLogger = OFF

in the properties file, and it stopped logging – at least, apart from logging an error about the logger not being configured properly…. J

Same net result, and no harm done, since it’s a test sandbox.

Thanks for the feedback, guys – much appreciated.

If I have anything useful to contribute once I am finished, I’ll mail it.

Kind regards,

Jason.

![image](https://dhis2.b-cdn.net/uploads/default/original/1X/c20b484732d529a6cd8e3fe9395b957770e079af.png)

> **···**
>
> Hi Jason,
> 
> we do use log4j for logging so you need to use the log4j configuration syntax to modify the behavior.
> 
> You can do this to raise the log level for the spring authentication, try something like this in your log4j.properties:
> 
> springframework.security.web.authentication = ERROR
> 
> Lars
> 
> On Thu, Mar 10, 2016 at 3:29 PM, Bob Jolliffe [bobjolliffe@gmail.com](mailto:bobjolliffe@gmail.com) wrote:
> 
> Not daft (well not completely daft). You cannot change the default logging configuration. It is set programmatically in java.
> 
> Your option is to create a custom log4j configuration as per the documentation.
> 
> In production you might want to do this anyway, rather than rely on the baked in configuration. Some time ago I produced a log4j configuration file which mimiced the behaviour of the hard coded configuration but I lost it - I know, I should have committed it somewhere but I didn’t. Now I will (eventually) have to do it again.
> 
> (An alternative future approach might be to allow some of these things to be fine tuned in the settings through the ui but this is currently not possible)
> 
> On 10 March 2016 at 14:21, Jason Phillips [jason@hisp.org](mailto:jason@hisp.org) wrote:
> 
> Hi Lars,
> 
> Yep – and unless I’ve dropped a few IQ points, I can’t see where it tell you how to adjust the logging levels.
> 
> It explains the extra logging I referred to, but doesn’t tell me how to change anything in the default logging, unless I am being daft?
> 
> I don’t want to use log4j, or anything else; I just want to stop the thing from logging authentications…
> 
> Am I being daft?
> 
> Best,
> 
> Jason.
> 
> **From:** Lars Helge Øverland [[mailto:lars@dhis2.org](mailto:lars@dhis2.org)]  
> **Sent:** Thursday, 10 March 2016 2:58 PM  
> **To:** Jason Phillips  
> **Cc:** DHIS 2 Users list  
> **Subject:** Re: [Dhis2-users] Tomcat Logging Levels / DHIS2
> 
> Hi Jason,
> 
> did you look at this section in the docs?
> 
> [http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html](http://dhis2.github.io/dhis2-docs/master/en/implementer/html/ch08s08.html)
> 
> regards,
> 
> Lars
> 
> On Thu, Mar 10, 2016 at 1:25 PM, Jason Phillips [jason@hisp.org](mailto:jason@hisp.org) wrote:
> 
> Hi all,
> 
> Can anyone provide me with details of how to make changes to DHIS2 Tomcat logging levels?
> 
> I have tried editing logging.properties in [BASE]/conf, and turning off logging (and various other attempts at different levels, such as SEVERE, WARNING, etc) using the folling settings:
> 
> * * *
> 
> 1catalina.org.apache.juli.FileHandler.level = OFF
> 
> 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> 1catalina.org.apache.juli.FileHandler.prefix = catalina.
> 
> 2localhost.org.apache.juli.FileHandler.level = OFF
> 
> 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> 
> 2localhost.org.apache.juli.FileHandler.prefix = localhost.
> 
> java.util.logging.ConsoleHandler.level = OFF
> 
> java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
> 
> …
> 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = OFF
> 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
> 
> * * *
> 
> And still no joy – DHIS2 logs away, regardless. I have set the levels to alternating variants of SEVERE, FINE, FINEST, WARNING and others to no discernible effect.
> 
> Any info would be most appreciated.
> 
> Also, while on the subject, I notice that logging duplication appears to be happening in the [BASE]/conf/logs folder, albeit separated into different files based on function/origin.
> 
> Are those logs affected by the same settings/properties, and how does one manipulate their levels, in addition to or separately from, the standard catalina.out?
> 
> Kind Regards,
> 
> **Jason Phillips**
> 
> **Information Systems / Infrastructure** \*\*  
> Health Information Systems Program  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\*\*
> 
> eMail: [jason@hisp.org](mailto:jason@hisp.org)  
> Landline: +27 21 712 0170  
> Mobile: +27 72 973 7250  
> Skype: jason.n.phillips
> 
> This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.
> 
> _This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer._
> 
> * * *
> 
> Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> Post to : [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)  
> Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> –
> 
> Lars Helge Øverland
> 
> Lead developer, DHIS 2
> 
> University of Oslo
> 
> Skype: larshelgeoverland
> 
> [http://www.dhis2.org](https://www.dhis2.org/)
> 
> _This message and any attachments are subject to a disclaimer published at [http://www.hisp.org/policies.html#comms\_disclaimer](http://www.hisp.org/policies.html#comms_disclaimer). Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to [disclaimer@hisp.org](mailto:disclaimer@hisp.org) and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer._
> 
> * * *
> 
> Mailing list: [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> Post to : [dhis2-users@lists.launchpad.net](mailto:dhis2-users@lists.launchpad.net)  
> Unsubscribe : [https://launchpad.net/~dhis2-users](https://launchpad.net/~dhis2-users)  
> More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> –
> 
> Lars Helge Øverland
> 
> Lead developer, DHIS 2
> 
> University of Oslo
> 
> Skype: larshelgeoverland
> 
> [http://www.dhis2.org](https://www.dhis2.org/)
