Skip to main content


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: 87
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 messageGo to next 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
Re: Change log level at runtime [message #1840943 is a reply to message #1712505] Thu, 29 April 2021 10:38 Go to previous message
Diego Visentin is currently offline Diego VisentinFriend
Messages: 5
Registered: March 2016
Junior Member
From version 4 of Kura the "setkuraloglevel" command is removed.
How do you get to change the log level at runtime now?
Previous Topic:Kura and Java 11
Next Topic:Data export from STEP 7 (TIA V16)
Goto Forum:
  


Current Time: Wed Dec 04 13:18:33 GMT 2024

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

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

Back to the top