Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » replacing WorkbenchLogger
replacing WorkbenchLogger [message #1208864] Mon, 25 November 2013 08:04 Go to next message
Jan Weidauer is currently offline Jan WeidauerFriend
Messages: 49
Registered: July 2009
Member
Hi,

I want to have control over the logging output right away from the start
of my RCP. So I would like to replace the default WorkbenchLogger with
my own one. How would I do this?

Regards,

Jan
Re: replacing WorkbenchLogger [message #1208894 is a reply to message #1208864] Mon, 25 November 2013 08:20 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You could add a lifecylce hook (@PostContextCreate) which:
a) Pushes a custom instance of Logger.class to the application context
b) Pushes a custom instance of ILoggerProvider.class to the application
context


Tom

On 25.11.13 09:04, Jan Weidauer wrote:
> Hi,
>
> I want to have control over the logging output right away from the start
> of my RCP. So I would like to replace the default WorkbenchLogger with
> my own one. How would I do this?
>
> Regards,
>
> Jan
>
Re: replacing WorkbenchLogger [message #1209049 is a reply to message #1208894] Mon, 25 November 2013 10:02 Go to previous messageGo to next message
Jan Weidauer is currently offline Jan WeidauerFriend
Messages: 49
Registered: July 2009
Member
Yes, that's what I am doing right now but it's a little late in the
lifecycle of the RCP. Any problems prior to the context creation I do
not see because they go to a different logger. I need to log all of them
in my logger.

Am 25.11.2013 09:20, schrieb Tom Schindl:
> You could add a lifecylce hook (@PostContextCreate) which:
> a) Pushes a custom instance of Logger.class to the application context
> b) Pushes a custom instance of ILoggerProvider.class to the application
> context
>
>
> Tom
>
> On 25.11.13 09:04, Jan Weidauer wrote:
>> Hi,
>>
>> I want to have control over the logging output right away from the start
>> of my RCP. So I would like to replace the default WorkbenchLogger with
>> my own one. How would I do this?
>>
>> Regards,
>>
>> Jan
>>
>
Re: replacing WorkbenchLogger [message #1209058 is a reply to message #1209049] Mon, 25 November 2013 10:06 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Then the only option is to create your own E4Application fork, maybe you
could file a bugzilla requesting a possibility to contribute this.

In e(fx)clipse bootstrap I've implemented it like this, instead of
contribution the logger statically I've delegated this to ILoggerProvider.

Tom

On 25.11.13 11:02, Jan Weidauer wrote:
> Yes, that's what I am doing right now but it's a little late in the
> lifecycle of the RCP. Any problems prior to the context creation I do
> not see because they go to a different logger. I need to log all of them
> in my logger.
>
> Am 25.11.2013 09:20, schrieb Tom Schindl:
>> You could add a lifecylce hook (@PostContextCreate) which:
>> a) Pushes a custom instance of Logger.class to the application context
>> b) Pushes a custom instance of ILoggerProvider.class to the application
>> context
>>
>>
>> Tom
>>
>> On 25.11.13 09:04, Jan Weidauer wrote:
>>> Hi,
>>>
>>> I want to have control over the logging output right away from the start
>>> of my RCP. So I would like to replace the default WorkbenchLogger with
>>> my own one. How would I do this?
>>>
>>> Regards,
>>>
>>> Jan
>>>
>>
>
Re: replacing WorkbenchLogger [message #1215805 is a reply to message #1209058] Thu, 28 November 2013 07:37 Go to previous messageGo to next message
Jan Weidauer is currently offline Jan WeidauerFriend
Messages: 49
Registered: July 2009
Member
Thanks Tom, that worked so far but isn't still enough. There is still
logging information I do not fetch, for example when bundles are missing
etc. What do I have to do to get those logging information too?


Am 25.11.2013 11:06, schrieb Tom Schindl:
> Then the only option is to create your own E4Application fork, maybe you
> could file a bugzilla requesting a possibility to contribute this.
>
> In e(fx)clipse bootstrap I've implemented it like this, instead of
> contribution the logger statically I've delegated this to ILoggerProvider.
>
> Tom
>
> On 25.11.13 11:02, Jan Weidauer wrote:
>> Yes, that's what I am doing right now but it's a little late in the
>> lifecycle of the RCP. Any problems prior to the context creation I do
>> not see because they go to a different logger. I need to log all of them
>> in my logger.
>>
>> Am 25.11.2013 09:20, schrieb Tom Schindl:
>>> You could add a lifecylce hook (@PostContextCreate) which:
>>> a) Pushes a custom instance of Logger.class to the application context
>>> b) Pushes a custom instance of ILoggerProvider.class to the application
>>> context
>>>
>>>
>>> Tom
>>>
>>> On 25.11.13 09:04, Jan Weidauer wrote:
>>>> Hi,
>>>>
>>>> I want to have control over the logging output right away from the start
>>>> of my RCP. So I would like to replace the default WorkbenchLogger with
>>>> my own one. How would I do this?
>>>>
>>>> Regards,
>>>>
>>>> Jan
>>>>
>>>
>>
>
Re: replacing WorkbenchLogger [message #1215874 is a reply to message #1215805] Thu, 28 November 2013 08:19 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Those are logged by OSGi, I think you need to attach a LogListener at
the OSGi-Level.

Tom
On 28.11.13 08:37, Jan Weidauer wrote:
> Thanks Tom, that worked so far but isn't still enough. There is still
> logging information I do not fetch, for example when bundles are missing
> etc. What do I have to do to get those logging information too?
>
>
> Am 25.11.2013 11:06, schrieb Tom Schindl:
>> Then the only option is to create your own E4Application fork, maybe you
>> could file a bugzilla requesting a possibility to contribute this.
>>
>> In e(fx)clipse bootstrap I've implemented it like this, instead of
>> contribution the logger statically I've delegated this to ILoggerProvider.
>>
>> Tom
>>
>> On 25.11.13 11:02, Jan Weidauer wrote:
>>> Yes, that's what I am doing right now but it's a little late in the
>>> lifecycle of the RCP. Any problems prior to the context creation I do
>>> not see because they go to a different logger. I need to log all of them
>>> in my logger.
>>>
>>> Am 25.11.2013 09:20, schrieb Tom Schindl:
>>>> You could add a lifecylce hook (@PostContextCreate) which:
>>>> a) Pushes a custom instance of Logger.class to the application context
>>>> b) Pushes a custom instance of ILoggerProvider.class to the application
>>>> context
>>>>
>>>>
>>>> Tom
>>>>
>>>> On 25.11.13 09:04, Jan Weidauer wrote:
>>>>> Hi,
>>>>>
>>>>> I want to have control over the logging output right away from the start
>>>>> of my RCP. So I would like to replace the default WorkbenchLogger with
>>>>> my own one. How would I do this?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Jan
>>>>>
>>>>
>>>
>>
>
Previous Topic:Overriding Edit command in Application.e4xmi from fragment.e4xmi
Next Topic:MApplication.find does not find MenuContributions
Goto Forum:
  


Current Time: Fri Apr 26 23:15:58 GMT 2024

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

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

Back to the top