Skip to main content



      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 07:19 Go to next message
Eclipse UserFriend
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 16:29 Go to previous messageGo to next message
Eclipse UserFriend
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 05:16 Go to previous messageGo to next message
Eclipse UserFriend
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 05:19 Go to previous messageGo to next message
Eclipse UserFriend
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] Sun, 18 March 2018 21:15 Go to previous message
Eclipse UserFriend
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: Tue Jun 17 07:52:28 EDT 2025

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

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

Back to the top