Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » logging with custom handlers(org.eclipse.fx.core logging)
logging with custom handlers [message #1698029] Wed, 10 June 2015 13:31 Go to next message
Pablo Gomez is currently offline Pablo GomezFriend
Messages: 28
Registered: October 2013
Junior Member
Hi!
I was just trying to customize some logging handlers and setting up @properties. e.g
# Logging
handlers = java.util.logging.FileHandler, myapp.MyCustomConsoleHandler
.level = DEBUG

# File Logging
java.util.logging.FileHandler.pattern = ./myApp.log
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level = DEBUG

# Console Logging
java.util.logging.ConsoleHandler.level = DEBUG


Of course, that does not work due to class loading issue as I'm working with OSGI. I thought at first may be a fragment from package org.eclipse.fx.core would solve the problem but it doesn't. Something like

# Logging
handlers = java.util.logging.FileHandler, org.eclipse.fx.core.log.MyCustomConsoleHandler
.level = DEBUG

# File Logging
java.util.logging.FileHandler.pattern = ./myApp.log
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.level = DEBUG

# Console Logging
java.util.logging.ConsoleHandler.level = DEBUG


Where this class org.eclipse.fx.core.log.MyCustomConsoleHandler is defined in a fragment of org.eclipse.fx.core
But it doesn't work neither.


What could be a good way to go here? Perhaps registering the handler from a service or something? or What might I be missing?

Thanks!
Br
Pablo

[Updated on: Wed, 10 June 2015 13:31]

Report message to a moderator

Re: logging with custom handlers [message #1698067 is a reply to message #1698029] Wed, 10 June 2015 18:45 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The Problem most likely is that java.util.Logger tries to load the class but because it isn't on any classpath visible the base classloaders this must fail - please file a bug so that we allow to register handlers through osgi
Re: logging with custom handlers [message #1698097 is a reply to message #1698067] Thu, 11 June 2015 08:18 Go to previous message
Pablo Gomez is currently offline Pablo GomezFriend
Messages: 28
Registered: October 2013
Junior Member
Thanks Tom!
I filed it up as an enhancement: https://bugs.eclipse.org/bugs/show_bug.cgi?id=469907
Previous Topic:Detaching views using DnD
Next Topic:@PreClose in PartDescriptor
Goto Forum:
  


Current Time: Fri Apr 26 22:49:58 GMT 2024

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

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

Back to the top