Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Change log level at runtime
Change log level at runtime [message #1691445] Tue, 07 April 2015 10:19 Go to next message
Alessandro Da Rugna is currently offline Alessandro Da RugnaFriend
Messages: 43
Registered: December 2014
Member
Is there any way to change a logger's level at runtime?
I would like to change between INFO and DEBUG on some features I'm working on without restarting Kura.

Thanks


My project: Kura web log level changer https://github.com/darugnaa/kura-web-log
My blog: http://darugnaa.github.io
Re: Change log level at runtime [message #1691890 is a reply to message #1691445] Fri, 10 April 2015 10:19 Go to previous messageGo to next message
Pierre Pitiot is currently offline Pierre PitiotFriend
Messages: 16
Registered: April 2015
Junior Member
Hello,

My apologies for the late response. This feature has been removed in the OSGI console due to dependencies problem with another stack.

You can add a flag in the log4j config file (/opt/eclipse/kura/kura/log4j.properties), but you have to restart Kura to active it.

Regards
--Pierre
Re: Change log level at runtime [message #1692077 is a reply to message #1691890] Mon, 13 April 2015 09:28 Go to previous messageGo to next message
Alessandro Da Rugna is currently offline Alessandro Da RugnaFriend
Messages: 43
Registered: December 2014
Member
Ok, thank you.

My project: Kura web log level changer https://github.com/darugnaa/kura-web-log
My blog: http://darugnaa.github.io
Re: Change log level at runtime [message #1703133 is a reply to message #1692077] Tue, 28 July 2015 18:54 Go to previous messageGo to next message
Alessandro Da Rugna is currently offline Alessandro Da RugnaFriend
Messages: 43
Registered: December 2014
Member
I know this feature has been added again, but its accessible only through OSGi console. I developed a simple web interface to change log levels at runtime.
I uploaded the project on my github page. It compiles with Maven 3.0.5 as deployment package, you can install it on any running kura instance.
I find it very useful when developing/debugging, hope it may help someone else.


My project: Kura web log level changer https://github.com/darugnaa/kura-web-log
My blog: http://darugnaa.github.io
Re: Change log level at runtime [message #1712459 is a reply to message #1703133] Sun, 25 October 2015 10:47 Go to previous messageGo to next message
paul stanton is currently offline paul stantonFriend
Messages: 82
Registered: July 2009
Member
Alessandro you mention this can be done via osgi console? what is the command?

Your plugin looks interesting, I might build and install on my testing device.

thanks, p.
Re: Change log level at runtime [message #1712505 is a reply to message #1712459] Mon, 26 October 2015 08:42 Go to previous messageGo to next message
Alessandro Da Rugna is currently offline Alessandro Da RugnaFriend
Messages: 43
Registered: December 2014
Member
Yes, kura already supports it from OSGi console. Connect to the console with telnet <host> 5002, commands are
getkuraloglevel
setkuraloglevel <loggername> <level>

where level is one of TRACE, DEBUG, INFO, WARN, CRITICAL, ERROR.
Those commands are defined in kura/org.eclipse.kura.core.log/src/main/java/org/eclipse/kura/core/log/LoggerCommandProvider.java

Please ask if you have any further question Smile


My project: Kura web log level changer https://github.com/darugnaa/kura-web-log
My blog: http://darugnaa.github.io
Re: Change log level at runtime [message #1719601 is a reply to message #1712505] Sat, 09 January 2016 16:47 Go to previous message
Alessandro Da Rugna is currently offline Alessandro Da RugnaFriend
Messages: 43
Registered: December 2014
Member
Just letting you know that I update my bundle https://github.com/darugnaa/kura-web-log
Now you can view the log directly in the browser.
Web interface is rather simple, any help is welcome =)


My project: Kura web log level changer https://github.com/darugnaa/kura-web-log
My blog: http://darugnaa.github.io
Previous Topic:Deploying Kura on Freescale IMX6 based boards
Next Topic:Remote Resource Management
Goto Forum:
  


Current Time: Mon Oct 23 00:52:40 GMT 2017

Powered by FUDForum. Page generated in 0.03158 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software