Sometimes we want to change the level of logging of a server in production.

I am not sure this is possible without restarting the server, which is often difficult to manage depending of the customer.

I know that log4j supports a way to dynamically reload the configuration when a file change has been detected. See configureAndWatch.

Is it supported in Ivy 4.x/5.x? Is there something we can do to enable this feature?

asked 28.11.2014 at 16:49

A1234's gravatar image

A1234
(suspended)
accept rate: 33%


It is possible to change the log level of a Logger in an ivy project. E.g.

Logger.getLogger(...).setLevel(Level.DEBUG);

I have once started an ivy project that displays all current loggers in a tree and gives you the possibility to change threir level. I share this project here: LogViewer.iar

You can then deploy that project to the server and use it to change the log level of certain loggers.

link

answered 01.12.2014 at 12:24

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
4.9k202857
accept rate: 74%

edited 04.12.2014 at 10:46

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958

Thank you Reto, we would be very interested in that LogViewer tool.

We were just talking last week about such a tool, that could be useful in production to change log levels.

Could you send me the sources? Because unfortunately, we don't have anymore access to your SVN repo from TI, due to technical problems about which Stéphane has already informed you recently.

(01.12.2014 at 12:57) A1234 A1234's gravatar image

ivy uses the API which does not watch for configuration changes: DOMConfigurator.html#configure(java.lang.String)

today I see no possability to change this behaviour without modifying the ivy core code in ch.ivyteam.log.Logger.

link

answered 01.12.2014 at 09:00

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

edited 01.12.2014 at 09:02

It could be a feature for a next release.

It is more difficult than using API DOMConfigurator.configureAndWatch(String), instead of DOMConfigurator.configure(String)?

(01.12.2014 at 09:10) A1234 A1234's gravatar image

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×28
×27

Asked: 28.11.2014 at 16:49

Seen: 6,162 times

Last updated: 04.12.2014 at 10:46