Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Logfile per bundle(How to define a log file per bundle?)
Logfile per bundle [message #1783356] Mon, 12 March 2018 11:19 Go to next message
Armin Inauen is currently offline Armin InauenFriend
Messages: 2
Registered: March 2018
Junior Member
I don't wanna log everything in /var/log/kura.log.
For my app bundle I'd like to define a separate log file. (/var/log/app.log)
How and where do I define it? Tried many things with log4j.properties without success.
Re: Logfile per bundle [message #1783536 is a reply to message #1783356] Tue, 13 March 2018 20:29 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi,
as far as I know, the only way is to leverage the log4j properties file defining another appender. Or, if you are not interested in what reported by the other bundles, modify the existing one to log only what reported by your bundle.

Best regards,
Matteo
Re: Logfile per bundle [message #1783570 is a reply to message #1783536] Wed, 14 March 2018 09:16 Go to previous messageGo to next message
Armin Inauen is currently offline Armin InauenFriend
Messages: 2
Registered: March 2018
Junior Member
Hi,
thank you.
Do I have to edit the Kura main log4j.properties file, or can I provide a property file within my bundle?

Best regards,
Armin
Re: Logfile per bundle [message #1783572 is a reply to message #1783570] Wed, 14 March 2018 09:19 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
I'm not an expert on log4j. I would suggest start modifying the Kura one.
But maybe in the official log4j documentation there is more.

Best regards,
Matteo
Re: Logfile per bundle [message #1783833 is a reply to message #1783572] Mon, 19 March 2018 01:15 Go to previous message
paul stanton is currently offline paul stantonFriend
Messages: 87
Registered: July 2009
Member
I would suspect you have to modify the kura log4j props. however, if you just want to set levels, you can do this via the osgi console.

see "setkuraloglevel"

You could script this to run at startup.
Previous Topic:stopping via osgi> exit causes reboot via watchdog
Next Topic:table created in the Hsql data base dropped after reboot
Goto Forum:
  


Current Time: Sun Dec 08 00:30:57 GMT 2024

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

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

Back to the top