You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Alex Karasulu <ak...@apache.org> on 2009/04/09 17:47:28 UTC
[ApacheDS] System.out message about server state
Hi guys,
In the following commit a number of System.out lines were added to various
ApacheDS services:
http://svn.apache.org/viewvc?view=rev&revision=696371
I understand that this was done to facilitate Studio's server log which
displays the starting and stopping of various services. The problem with
this is that is generates a lot of output clutter during test that are run
when building the project. Sometimes one feels as though the test failed
since they're used to the old format. I don't think this information is
that worth while to have on the command line but it it does make sense in
Studio's log view.
Fixing this is simple. We can create a basic ServiceListener interface
which contains the start() and stop() methods. The services can then have
some code to notify registered listeners. Then an implementation can be
created to just print out these status messages to the console when the
services are being used in Studio.
WDYT? Anyone interested in implementing it?
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
Apache Felix :: http://felix.apache.org
Re: [ApacheDS] System.out message about server state
Posted by Emmanuel Lecharny <el...@apache.org>.
>> OK this is not a big deal. We keep the log statements which are good to
> have but remove the System.out lines. Instead the listeners are notified,
> and the implementation registered to make Studio work right does a
> System.out.
If we have listeners, the studio will just have to instanciate them,
so no need to do a System.out in this case. Right now, we need the
System.out just because we don't have those listeners.
So as soon as we have a way to get those message through an API
(listener), we don't need anymore System.out.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: [ApacheDS] System.out message about server state
Posted by David Jencks <da...@yahoo.com>.
On Apr 9, 2009, at 11:56 PM, Pierre-Arnaud Marcelot wrote:
> It's just a matter of adding a few lines in the already existing
> Log4J configuration file.
>
> And, as I said, since Studio and the launched server will not run
> under the same JVM, i'm affraid it's not possible to use the
> listeners.
jmx remoting? I've never tried remote event notification but IIRC
it's supposed to work.
david jencks
>
> Regards,
> Pierre-Arnaud
>
> On Fri, Apr 10, 2009 at 8:48 AM, Emmanuel Lecharny <elecharny@apache.org
> > wrote:
> > Coming back on the initial subject, as long as the informations
> that were
> > printed using sysouts are logged as INFO, it's ok for me. I'll
> tweak my
> > Log4J configuration to make them appear in the Console view.
>
> Well, I think it's easier to have those listeners.
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Re: [ApacheDS] System.out message about server state
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Yeah, I think thoses listeners can be a very good idea.They will be helpful
in embedded mode if one needs to be notified when a service starts and
stops.
+1!
P-A
On Fri, Apr 10, 2009 at 9:02 AM, Emmanuel Lecharny <el...@apache.org>wrote:
> > It's just a matter of adding a few lines in the already existing Log4J
> > configuration file.
> > And, as I said, since Studio and the launched server will not run under
> the
> > same JVM, i'm affraid it's not possible to use the listeners.
>
> The idea to add those listeners in the API is still a good idea. In
> your case, you just have to implement those listeners to get the
> message and System.out them.
>
> However, if you think that it's enough to deal with log4j, then we can
> also just remove those System.out in the server and transform them to
> log.info("blah");
>
> It's up to you guys !
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Re: [ApacheDS] System.out message about server state
Posted by Emmanuel Lecharny <el...@apache.org>.
> It's just a matter of adding a few lines in the already existing Log4J
> configuration file.
> And, as I said, since Studio and the launched server will not run under the
> same JVM, i'm affraid it's not possible to use the listeners.
The idea to add those listeners in the API is still a good idea. In
your case, you just have to implement those listeners to get the
message and System.out them.
However, if you think that it's enough to deal with log4j, then we can
also just remove those System.out in the server and transform them to
log.info("blah");
It's up to you guys !
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: [ApacheDS] System.out message about server state
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
It's just a matter of adding a few lines in the already existing Log4J
configuration file.
And, as I said, since Studio and the launched server will not run under the
same JVM, i'm affraid it's not possible to use the listeners.
Regards,
Pierre-Arnaud
On Fri, Apr 10, 2009 at 8:48 AM, Emmanuel Lecharny <el...@apache.org>wrote:
> > Coming back on the initial subject, as long as the informations that were
> > printed using sysouts are logged as INFO, it's ok for me. I'll tweak my
> > Log4J configuration to make them appear in the Console view.
>
> Well, I think it's easier to have those listeners.
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Re: [ApacheDS] System.out message about server state
Posted by Emmanuel Lecharny <el...@apache.org>.
> Coming back on the initial subject, as long as the informations that were
> printed using sysouts are logged as INFO, it's ok for me. I'll tweak my
> Log4J configuration to make them appear in the Console view.
Well, I think it's easier to have those listeners.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: [ApacheDS] System.out message about server state
Posted by Alex Karasulu <ak...@gmail.com>.
I was joking really should have put in a :-).
Thanks for the heads up.
Alex
On Fri, Apr 10, 2009 at 2:47 AM, Pierre-Arnaud Marcelot <pa...@marcelot.net>wrote:
> Yeah, sorry.
> Yesterday, I was focusing on fixing the bug on Studio's Windows installer
> to be able to release it at last, so I left the [ApacheDS] flagged messaged
> for today...
>
> BTW, the same bug occurs on the Server installer, and I will fix it soon,
> so we can have a fixed installer for the 1.5.5 release of Apache DS.
>
> Coming back on the initial subject, as long as the informations that were
> printed using sysouts are logged as INFO, it's ok for me. I'll tweak my
> Log4J configuration to make them appear in the Console view.
>
> Regards,
> Pierre-Arnaud
>
>
> On Fri, Apr 10, 2009 at 8:39 AM, Alex Karasulu <ak...@gmail.com>wrote:
>
>> Ahh ok but now that we do not need this System.out stuff that's most
>> excellent. You should have spoken out before this thread got this long bro
>> :). My fingers are tired.
>>
>> Alex
>>
>>
>> On Fri, Apr 10, 2009 at 2:37 AM, Pierre-Arnaud Marcelot <pa...@marcelot.net>wrote:
>>
>>> Hi Alex,
>>> I like the idea of the listeners, but I think we won't be able to use
>>> them in Studio.
>>>
>>> We're not launching the server in embedded mode. We're using a mechanism
>>> that launches the process as an external JVM, just like the Run or Debug
>>> configurations run in Eclipse.
>>>
>>> So I believe this would prevent us from using the listener inside Studio.
>>>
>>> Regards,
>>> Pierre-Arnaud
>>>
>>>
>>> On Fri, Apr 10, 2009 at 5:13 AM, Alex Karasulu <ak...@gmail.com>wrote:
>>>
>>>> On Thu, Apr 9, 2009 at 6:51 PM, Emmanuel Lecharny <elecharny@apache.org
>>>> > wrote:
>>>>
>>>>> On Thu, Apr 9, 2009 at 7:22 PM, Alex Karasulu <ak...@gmail.com>
>>>>> wrote:
>>>>> >
>>>>> > On Thu, Apr 9, 2009 at 1:11 PM, Martin Alderson
>>>>> > <Ma...@salfordsoftware.co.uk> wrote:
>>>>> >>
>>>>> >> > Martin these are not Log messages but purely System.out.println()
>>>>> method
>>>>> >> > calls.
>>>>> >> >
>>>>> >> > Alex
>>>>> >>
>>>>> >> Looks like there's both:
>>>>> >>
>>>>> >> LOG.info( "Ldap service started." );
>>>>> >> System.out.println( "Ldap service started." );
>>>>> >>
>>>>> >> I think it could be useful to have ServiceListeners anyway, but for
>>>>> this
>>>>> >> case I would have thought the usual logging configuration would be
>>>>> enough
>>>>> >> (after the System.out.printlns have been removed).
>>>>> >>
>>>>> >
>>>>> > Oh yes u are right. I was not even thinking about the log statements
>>>>> which
>>>>> > can be filtered via the log4j.configuration.
>>>>>
>>>>> No that's not enough. Those info are used by studio to update the
>>>>> Server states. Using the logs is too complicated. If we don't want to
>>>>> implement the listeners, then we should keep those System.out.
>>>>>
>>>>
>>>> OK this is not a big deal. We keep the log statements which are good to
>>>> have but remove the System.out lines. Instead the listeners are notified,
>>>> and the implementation registered to make Studio work right does a
>>>> System.out.
>>>>
>>>> Sounds good?
>>>>
>>>>
>>>> --
>>>> Alex Karasulu
>>>> My Blog :: http://www.jroller.com/akarasulu/
>>>> Apache Directory Server :: http://directory.apache.org
>>>> Apache MINA :: http://mina.apache.org
>>>>
>>>>
>>>
>>
>>
>> --
>> Alex Karasulu
>> My Blog :: http://www.jroller.com/akarasulu/
>> Apache Directory Server :: http://directory.apache.org
>> Apache MINA :: http://mina.apache.org
>>
>>
>
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
Re: [ApacheDS] System.out message about server state
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Yeah, sorry.
Yesterday, I was focusing on fixing the bug on Studio's Windows installer to
be able to release it at last, so I left the [ApacheDS] flagged messaged for
today...
BTW, the same bug occurs on the Server installer, and I will fix it soon, so
we can have a fixed installer for the 1.5.5 release of Apache DS.
Coming back on the initial subject, as long as the informations that were
printed using sysouts are logged as INFO, it's ok for me. I'll tweak my
Log4J configuration to make them appear in the Console view.
Regards,
Pierre-Arnaud
On Fri, Apr 10, 2009 at 8:39 AM, Alex Karasulu <ak...@gmail.com> wrote:
> Ahh ok but now that we do not need this System.out stuff that's most
> excellent. You should have spoken out before this thread got this long bro
> :). My fingers are tired.
>
> Alex
>
>
> On Fri, Apr 10, 2009 at 2:37 AM, Pierre-Arnaud Marcelot <pa...@marcelot.net>wrote:
>
>> Hi Alex,
>> I like the idea of the listeners, but I think we won't be able to use them
>> in Studio.
>>
>> We're not launching the server in embedded mode. We're using a mechanism
>> that launches the process as an external JVM, just like the Run or Debug
>> configurations run in Eclipse.
>>
>> So I believe this would prevent us from using the listener inside Studio.
>>
>> Regards,
>> Pierre-Arnaud
>>
>>
>> On Fri, Apr 10, 2009 at 5:13 AM, Alex Karasulu <ak...@gmail.com>wrote:
>>
>>> On Thu, Apr 9, 2009 at 6:51 PM, Emmanuel Lecharny <el...@apache.org>wrote:
>>>
>>>> On Thu, Apr 9, 2009 at 7:22 PM, Alex Karasulu <ak...@gmail.com>
>>>> wrote:
>>>> >
>>>> > On Thu, Apr 9, 2009 at 1:11 PM, Martin Alderson
>>>> > <Ma...@salfordsoftware.co.uk> wrote:
>>>> >>
>>>> >> > Martin these are not Log messages but purely System.out.println()
>>>> method
>>>> >> > calls.
>>>> >> >
>>>> >> > Alex
>>>> >>
>>>> >> Looks like there's both:
>>>> >>
>>>> >> LOG.info( "Ldap service started." );
>>>> >> System.out.println( "Ldap service started." );
>>>> >>
>>>> >> I think it could be useful to have ServiceListeners anyway, but for
>>>> this
>>>> >> case I would have thought the usual logging configuration would be
>>>> enough
>>>> >> (after the System.out.printlns have been removed).
>>>> >>
>>>> >
>>>> > Oh yes u are right. I was not even thinking about the log statements
>>>> which
>>>> > can be filtered via the log4j.configuration.
>>>>
>>>> No that's not enough. Those info are used by studio to update the
>>>> Server states. Using the logs is too complicated. If we don't want to
>>>> implement the listeners, then we should keep those System.out.
>>>>
>>>
>>> OK this is not a big deal. We keep the log statements which are good to
>>> have but remove the System.out lines. Instead the listeners are notified,
>>> and the implementation registered to make Studio work right does a
>>> System.out.
>>>
>>> Sounds good?
>>>
>>>
>>> --
>>> Alex Karasulu
>>> My Blog :: http://www.jroller.com/akarasulu/
>>> Apache Directory Server :: http://directory.apache.org
>>> Apache MINA :: http://mina.apache.org
>>>
>>>
>>
>
>
> --
> Alex Karasulu
> My Blog :: http://www.jroller.com/akarasulu/
> Apache Directory Server :: http://directory.apache.org
> Apache MINA :: http://mina.apache.org
>
>
Re: [ApacheDS] System.out message about server state
Posted by Alex Karasulu <ak...@gmail.com>.
Ahh ok but now that we do not need this System.out stuff that's most
excellent. You should have spoken out before this thread got this long bro
:). My fingers are tired.
Alex
On Fri, Apr 10, 2009 at 2:37 AM, Pierre-Arnaud Marcelot <pa...@marcelot.net>wrote:
> Hi Alex,
> I like the idea of the listeners, but I think we won't be able to use them
> in Studio.
>
> We're not launching the server in embedded mode. We're using a mechanism
> that launches the process as an external JVM, just like the Run or Debug
> configurations run in Eclipse.
>
> So I believe this would prevent us from using the listener inside Studio.
>
> Regards,
> Pierre-Arnaud
>
>
> On Fri, Apr 10, 2009 at 5:13 AM, Alex Karasulu <ak...@gmail.com>wrote:
>
>> On Thu, Apr 9, 2009 at 6:51 PM, Emmanuel Lecharny <el...@apache.org>wrote:
>>
>>> On Thu, Apr 9, 2009 at 7:22 PM, Alex Karasulu <ak...@gmail.com>
>>> wrote:
>>> >
>>> > On Thu, Apr 9, 2009 at 1:11 PM, Martin Alderson
>>> > <Ma...@salfordsoftware.co.uk> wrote:
>>> >>
>>> >> > Martin these are not Log messages but purely System.out.println()
>>> method
>>> >> > calls.
>>> >> >
>>> >> > Alex
>>> >>
>>> >> Looks like there's both:
>>> >>
>>> >> LOG.info( "Ldap service started." );
>>> >> System.out.println( "Ldap service started." );
>>> >>
>>> >> I think it could be useful to have ServiceListeners anyway, but for
>>> this
>>> >> case I would have thought the usual logging configuration would be
>>> enough
>>> >> (after the System.out.printlns have been removed).
>>> >>
>>> >
>>> > Oh yes u are right. I was not even thinking about the log statements
>>> which
>>> > can be filtered via the log4j.configuration.
>>>
>>> No that's not enough. Those info are used by studio to update the
>>> Server states. Using the logs is too complicated. If we don't want to
>>> implement the listeners, then we should keep those System.out.
>>>
>>
>> OK this is not a big deal. We keep the log statements which are good to
>> have but remove the System.out lines. Instead the listeners are notified,
>> and the implementation registered to make Studio work right does a
>> System.out.
>>
>> Sounds good?
>>
>>
>> --
>> Alex Karasulu
>> My Blog :: http://www.jroller.com/akarasulu/
>> Apache Directory Server :: http://directory.apache.org
>> Apache MINA :: http://mina.apache.org
>>
>>
>
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
Re: [ApacheDS] System.out message about server state
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Alex,
I like the idea of the listeners, but I think we won't be able to use them
in Studio.
We're not launching the server in embedded mode. We're using a mechanism
that launches the process as an external JVM, just like the Run or Debug
configurations run in Eclipse.
So I believe this would prevent us from using the listener inside Studio.
Regards,
Pierre-Arnaud
On Fri, Apr 10, 2009 at 5:13 AM, Alex Karasulu <ak...@gmail.com> wrote:
> On Thu, Apr 9, 2009 at 6:51 PM, Emmanuel Lecharny <el...@apache.org>wrote:
>
>> On Thu, Apr 9, 2009 at 7:22 PM, Alex Karasulu <ak...@gmail.com>
>> wrote:
>> >
>> > On Thu, Apr 9, 2009 at 1:11 PM, Martin Alderson
>> > <Ma...@salfordsoftware.co.uk> wrote:
>> >>
>> >> > Martin these are not Log messages but purely System.out.println()
>> method
>> >> > calls.
>> >> >
>> >> > Alex
>> >>
>> >> Looks like there's both:
>> >>
>> >> LOG.info( "Ldap service started." );
>> >> System.out.println( "Ldap service started." );
>> >>
>> >> I think it could be useful to have ServiceListeners anyway, but for
>> this
>> >> case I would have thought the usual logging configuration would be
>> enough
>> >> (after the System.out.printlns have been removed).
>> >>
>> >
>> > Oh yes u are right. I was not even thinking about the log statements
>> which
>> > can be filtered via the log4j.configuration.
>>
>> No that's not enough. Those info are used by studio to update the
>> Server states. Using the logs is too complicated. If we don't want to
>> implement the listeners, then we should keep those System.out.
>>
>
> OK this is not a big deal. We keep the log statements which are good to
> have but remove the System.out lines. Instead the listeners are notified,
> and the implementation registered to make Studio work right does a
> System.out.
>
> Sounds good?
>
>
> --
> Alex Karasulu
> My Blog :: http://www.jroller.com/akarasulu/
> Apache Directory Server :: http://directory.apache.org
> Apache MINA :: http://mina.apache.org
>
>
Re: [ApacheDS] System.out message about server state
Posted by Alex Karasulu <ak...@gmail.com>.
On Thu, Apr 9, 2009 at 6:51 PM, Emmanuel Lecharny <el...@apache.org>wrote:
> On Thu, Apr 9, 2009 at 7:22 PM, Alex Karasulu <ak...@gmail.com> wrote:
> >
> > On Thu, Apr 9, 2009 at 1:11 PM, Martin Alderson
> > <Ma...@salfordsoftware.co.uk> wrote:
> >>
> >> > Martin these are not Log messages but purely System.out.println()
> method
> >> > calls.
> >> >
> >> > Alex
> >>
> >> Looks like there's both:
> >>
> >> LOG.info( "Ldap service started." );
> >> System.out.println( "Ldap service started." );
> >>
> >> I think it could be useful to have ServiceListeners anyway, but for this
> >> case I would have thought the usual logging configuration would be
> enough
> >> (after the System.out.printlns have been removed).
> >>
> >
> > Oh yes u are right. I was not even thinking about the log statements
> which
> > can be filtered via the log4j.configuration.
>
> No that's not enough. Those info are used by studio to update the
> Server states. Using the logs is too complicated. If we don't want to
> implement the listeners, then we should keep those System.out.
>
OK this is not a big deal. We keep the log statements which are good to
have but remove the System.out lines. Instead the listeners are notified,
and the implementation registered to make Studio work right does a
System.out.
Sounds good?
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
Re: [ApacheDS] System.out message about server state
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Emmanuel,
Actually we're not using those sysouts to update the states of the server.
We're checking the ports to verify if a server is stopped/starting/started.
So, it can be removed without issue.
Regards,
Pierre-Arnaud
On Fri, Apr 10, 2009 at 12:51 AM, Emmanuel Lecharny <el...@apache.org>wrote:
> On Thu, Apr 9, 2009 at 7:22 PM, Alex Karasulu <ak...@gmail.com> wrote:
> >
> > On Thu, Apr 9, 2009 at 1:11 PM, Martin Alderson
> > <Ma...@salfordsoftware.co.uk> wrote:
> >>
> >> > Martin these are not Log messages but purely System.out.println()
> method
> >> > calls.
> >> >
> >> > Alex
> >>
> >> Looks like there's both:
> >>
> >> LOG.info( "Ldap service started." );
> >> System.out.println( "Ldap service started." );
> >>
> >> I think it could be useful to have ServiceListeners anyway, but for this
> >> case I would have thought the usual logging configuration would be
> enough
> >> (after the System.out.printlns have been removed).
> >>
> >
> > Oh yes u are right. I was not even thinking about the log statements
> which
> > can be filtered via the log4j.configuration.
>
> No that's not enough. Those info are used by studio to update the
> Server states. Using the logs is too complicated. If we don't want to
> implement the listeners, then we should keep those System.out.
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Re: [ApacheDS] System.out message about server state
Posted by Emmanuel Lecharny <el...@apache.org>.
On Thu, Apr 9, 2009 at 7:22 PM, Alex Karasulu <ak...@gmail.com> wrote:
>
> On Thu, Apr 9, 2009 at 1:11 PM, Martin Alderson
> <Ma...@salfordsoftware.co.uk> wrote:
>>
>> > Martin these are not Log messages but purely System.out.println() method
>> > calls.
>> >
>> > Alex
>>
>> Looks like there's both:
>>
>> LOG.info( "Ldap service started." );
>> System.out.println( "Ldap service started." );
>>
>> I think it could be useful to have ServiceListeners anyway, but for this
>> case I would have thought the usual logging configuration would be enough
>> (after the System.out.printlns have been removed).
>>
>
> Oh yes u are right. I was not even thinking about the log statements which
> can be filtered via the log4j.configuration.
No that's not enough. Those info are used by studio to update the
Server states. Using the logs is too complicated. If we don't want to
implement the listeners, then we should keep those System.out.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: [ApacheDS] System.out message about server state
Posted by Alex Karasulu <ak...@gmail.com>.
On Thu, Apr 9, 2009 at 1:11 PM, Martin Alderson <
Martin.Alderson@salfordsoftware.co.uk> wrote:
> > Martin these are not Log messages but purely System.out.println() method
> > calls.
> >
> > Alex
>
> Looks like there's both:
>
> LOG.info( "Ldap service started." );
> System.out.println( "Ldap service started." );
>
> I think it could be useful to have ServiceListeners anyway, but for this
> case I would have thought the usual logging configuration would be enough
> (after the System.out.printlns have been removed).
>
>
Oh yes u are right. I was not even thinking about the log statements which
can be filtered via the log4j.configuration.
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
RE: [ApacheDS] System.out message about server state
Posted by Martin Alderson <Ma...@salfordsoftware.co.uk>.
> Martin these are not Log messages but purely System.out.println() method
> calls.
>
> Alex
Looks like there's both:
LOG.info( "Ldap service started." );
System.out.println( "Ldap service started." );
I think it could be useful to have ServiceListeners anyway, but for this case I would have thought the usual logging configuration would be enough (after the System.out.printlns have been removed).
Martin
Re: [ApacheDS] System.out message about server state
Posted by Alex Karasulu <ak...@gmail.com>.
Martin these are not Log messages but purely System.out.println() method
calls.
Alex
On Thu, Apr 9, 2009 at 12:09 PM, Martin Alderson <
Martin.Alderson@salfordsoftware.co.uk> wrote:
> > Hi guys,
> >
> > In the following commit a number of System.out lines were added to
> various
> > ApacheDS services:
> >
> > http://svn.apache.org/viewvc?view=rev&revision=696371
> >
> > I understand that this was done to facilitate Studio's server log which
> > displays the starting and stopping of various services. The problem with
> > this is that is generates a lot of output clutter during test that are
> run
> > when building the project. Sometimes one feels as though the test failed
> > since they're used to the old format. I don't think this information is
> > that worth while to have on the command line but it it does make sense in
> > Studio's log view.
> >
> > Fixing this is simple. We can create a basic ServiceListener interface
> > which contains the start() and stop() methods. The services can then have
> > some code to notify registered listeners. Then an implementation can be
> > created to just print out these status messages to the console when the
> > services are being used in Studio.
> >
> > WDYT? Anyone interested in implementing it?
>
>
> I'm a bit ignorant here but can't we just have the info log messages which
> the tests can turn off and studio can turn on using a relevant log
> properties file?
>
> I quite like having those messages displayed when running the server from
> the command line too.
>
> Martin
>
>
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
RE: [ApacheDS] System.out message about server state
Posted by Martin Alderson <Ma...@salfordsoftware.co.uk>.
> Hi guys,
>
> In the following commit a number of System.out lines were added to various
> ApacheDS services:
>
> http://svn.apache.org/viewvc?view=rev&revision=696371
>
> I understand that this was done to facilitate Studio's server log which
> displays the starting and stopping of various services. The problem with
> this is that is generates a lot of output clutter during test that are run
> when building the project. Sometimes one feels as though the test failed
> since they're used to the old format. I don't think this information is
> that worth while to have on the command line but it it does make sense in
> Studio's log view.
>
> Fixing this is simple. We can create a basic ServiceListener interface
> which contains the start() and stop() methods. The services can then have
> some code to notify registered listeners. Then an implementation can be
> created to just print out these status messages to the console when the
> services are being used in Studio.
>
> WDYT? Anyone interested in implementing it?
I'm a bit ignorant here but can't we just have the info log messages which the tests can turn off and studio can turn on using a relevant log properties file?
I quite like having those messages displayed when running the server from the command line too.
Martin
Re: [ApacheDS] System.out message about server state
Posted by Alex Karasulu <ak...@gmail.com>.
I created this issue in JIRA for this stuff:
https://issues.apache.org/jira/browse/DIRSERVER-1346
On Thu, Apr 9, 2009 at 12:18 PM, Alex Karasulu <ak...@gmail.com> wrote:
> Thanks for volunteering. You might want to work in the trunk for this. If
> there is a base class (all but LdapService) then there is where you might
> want to place the add/remove listener methods.
>
> Thanks,
> Alex
>
> On Thu, Apr 9, 2009 at 12:04 PM, Andrea Gariboldi <
> andrea.gariboldi@gmail.com> wrote:
>
>> I can do it.
>> Andrea
>>
>> 2009/4/9 Emmanuel Lecharny <el...@apache.org>
>>
>> On Thu, Apr 9, 2009 at 5:47 PM, Alex Karasulu <ak...@apache.org>
>>> wrote:
>>> > Hi guys,
>>> >
>>> > In the following commit a number of System.out lines were added to
>>> various
>>> > ApacheDS services:
>>> >
>>> > http://svn.apache.org/viewvc?view=rev&revision=696371
>>> >
>>> > I understand that this was done to facilitate Studio's server log which
>>> > displays the starting and stopping of various services. The problem
>>> with
>>> > this is that is generates a lot of output clutter during test that are
>>> run
>>> > when building the project. Sometimes one feels as though the test
>>> failed
>>> > since they're used to the old format. I don't think this information
>>> is
>>> > that worth while to have on the command line but it it does make sense
>>> in
>>> > Studio's log view.
>>>
>>> Yeah, that is the reason why we added those System.out. The drawback
>>> is that you get spurious logs when running tests. Right now, we are
>>> not talking about hundreds of lines, though. I think it's more
>>> something like 20.
>>>
>>> > Fixing this is simple. We can create a basic ServiceListener interface
>>> > which contains the start() and stop() methods. The services can then
>>> have
>>> > some code to notify registered listeners. Then an implementation can
>>> be
>>> > created to just print out these status messages to the console when the
>>> > services are being used in Studio.
>>>
>>> We also discussed the pros and cons about this approach, and were just
>>> too lazzy to implement them. I think it can be whipped in a couple of
>>> hours thoughs.
>>>
>>> May I suggest we do that when 1.5.5. will be released ?
>>>
>>> > WDYT? Anyone interested in implementing it?
>>>
>>> Don't have time right now. But what about filling a JIRA so that
>>> someone can pick this issue and fix it ?
>>>
>>> --
>>> Regards,
>>> Cordialement,
>>> Emmanuel Lécharny
>>> www.iktek.com
>>>
>>
>>
>
>
> --
> Alex Karasulu
> My Blog :: http://www.jroller.com/akarasulu/
> Apache Directory Server :: http://directory.apache.org
> Apache MINA :: http://mina.apache.org
>
>
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
Re: [ApacheDS] System.out message about server state
Posted by Alex Karasulu <ak...@gmail.com>.
Thanks for volunteering. You might want to work in the trunk for this. If
there is a base class (all but LdapService) then there is where you might
want to place the add/remove listener methods.
Thanks,
Alex
On Thu, Apr 9, 2009 at 12:04 PM, Andrea Gariboldi <
andrea.gariboldi@gmail.com> wrote:
> I can do it.
> Andrea
>
> 2009/4/9 Emmanuel Lecharny <el...@apache.org>
>
> On Thu, Apr 9, 2009 at 5:47 PM, Alex Karasulu <ak...@apache.org>
>> wrote:
>> > Hi guys,
>> >
>> > In the following commit a number of System.out lines were added to
>> various
>> > ApacheDS services:
>> >
>> > http://svn.apache.org/viewvc?view=rev&revision=696371
>> >
>> > I understand that this was done to facilitate Studio's server log which
>> > displays the starting and stopping of various services. The problem
>> with
>> > this is that is generates a lot of output clutter during test that are
>> run
>> > when building the project. Sometimes one feels as though the test
>> failed
>> > since they're used to the old format. I don't think this information is
>> > that worth while to have on the command line but it it does make sense
>> in
>> > Studio's log view.
>>
>> Yeah, that is the reason why we added those System.out. The drawback
>> is that you get spurious logs when running tests. Right now, we are
>> not talking about hundreds of lines, though. I think it's more
>> something like 20.
>>
>> > Fixing this is simple. We can create a basic ServiceListener interface
>> > which contains the start() and stop() methods. The services can then
>> have
>> > some code to notify registered listeners. Then an implementation can be
>> > created to just print out these status messages to the console when the
>> > services are being used in Studio.
>>
>> We also discussed the pros and cons about this approach, and were just
>> too lazzy to implement them. I think it can be whipped in a couple of
>> hours thoughs.
>>
>> May I suggest we do that when 1.5.5. will be released ?
>>
>> > WDYT? Anyone interested in implementing it?
>>
>> Don't have time right now. But what about filling a JIRA so that
>> someone can pick this issue and fix it ?
>>
>> --
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.iktek.com
>>
>
>
--
Alex Karasulu
My Blog :: http://www.jroller.com/akarasulu/
Apache Directory Server :: http://directory.apache.org
Apache MINA :: http://mina.apache.org
Re: [ApacheDS] System.out message about server state
Posted by Andrea Gariboldi <an...@gmail.com>.
I can do it.
Andrea
2009/4/9 Emmanuel Lecharny <el...@apache.org>
> On Thu, Apr 9, 2009 at 5:47 PM, Alex Karasulu <ak...@apache.org>
> wrote:
> > Hi guys,
> >
> > In the following commit a number of System.out lines were added to
> various
> > ApacheDS services:
> >
> > http://svn.apache.org/viewvc?view=rev&revision=696371
> >
> > I understand that this was done to facilitate Studio's server log which
> > displays the starting and stopping of various services. The problem with
> > this is that is generates a lot of output clutter during test that are
> run
> > when building the project. Sometimes one feels as though the test failed
> > since they're used to the old format. I don't think this information is
> > that worth while to have on the command line but it it does make sense in
> > Studio's log view.
>
> Yeah, that is the reason why we added those System.out. The drawback
> is that you get spurious logs when running tests. Right now, we are
> not talking about hundreds of lines, though. I think it's more
> something like 20.
>
> > Fixing this is simple. We can create a basic ServiceListener interface
> > which contains the start() and stop() methods. The services can then have
> > some code to notify registered listeners. Then an implementation can be
> > created to just print out these status messages to the console when the
> > services are being used in Studio.
>
> We also discussed the pros and cons about this approach, and were just
> too lazzy to implement them. I think it can be whipped in a couple of
> hours thoughs.
>
> May I suggest we do that when 1.5.5. will be released ?
>
> > WDYT? Anyone interested in implementing it?
>
> Don't have time right now. But what about filling a JIRA so that
> someone can pick this issue and fix it ?
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Re: [ApacheDS] System.out message about server state
Posted by Emmanuel Lecharny <el...@apache.org>.
On Thu, Apr 9, 2009 at 5:47 PM, Alex Karasulu <ak...@apache.org> wrote:
> Hi guys,
>
> In the following commit a number of System.out lines were added to various
> ApacheDS services:
>
> http://svn.apache.org/viewvc?view=rev&revision=696371
>
> I understand that this was done to facilitate Studio's server log which
> displays the starting and stopping of various services. The problem with
> this is that is generates a lot of output clutter during test that are run
> when building the project. Sometimes one feels as though the test failed
> since they're used to the old format. I don't think this information is
> that worth while to have on the command line but it it does make sense in
> Studio's log view.
Yeah, that is the reason why we added those System.out. The drawback
is that you get spurious logs when running tests. Right now, we are
not talking about hundreds of lines, though. I think it's more
something like 20.
> Fixing this is simple. We can create a basic ServiceListener interface
> which contains the start() and stop() methods. The services can then have
> some code to notify registered listeners. Then an implementation can be
> created to just print out these status messages to the console when the
> services are being used in Studio.
We also discussed the pros and cons about this approach, and were just
too lazzy to implement them. I think it can be whipped in a couple of
hours thoughs.
May I suggest we do that when 1.5.5. will be released ?
> WDYT? Anyone interested in implementing it?
Don't have time right now. But what about filling a JIRA so that
someone can pick this issue and fix it ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com