Skip to main content



      Home
Home » Eclipse Projects » Kura » Change log level at runtime
Change log level at runtime [message #1691445] Tue, 07 April 2015 06:19 Go to next message
Eclipse UserFriend
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
Re: Change log level at runtime [message #1691890 is a reply to message #1691445] Fri, 10 April 2015 06:19 Go to previous messageGo to next message
Eclipse UserFriend
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 05:28 Go to previous messageGo to next message
Eclipse UserFriend
Ok, thank you.
Re: Change log level at runtime [message #1703133 is a reply to message #1692077] Tue, 28 July 2015 14:54 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Change log level at runtime [message #1712459 is a reply to message #1703133] Sun, 25 October 2015 06:47 Go to previous messageGo to next message
Eclipse UserFriend
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 04:42 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Change log level at runtime [message #1719601 is a reply to message #1712505] Sat, 09 January 2016 11:47 Go to previous messageGo to next message
Eclipse UserFriend
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 =)
Re: Change log level at runtime [message #1840943 is a reply to message #1712505] Thu, 29 April 2021 06:38 Go to previous message
Eclipse UserFriend
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: Thu Jun 12 21:06:54 EDT 2025

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

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

Back to the top