You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Lars Kiesow <lk...@uos.de> on 2016/02/02 15:11:05 UTC
Re: Automatically Launching `log:tail`
Hi,
sine this is still annoying me:
Does anyone know if it is possible?
Regards,
Lars
On Wed, 4 Nov 2015 19:50:33 +0100
Lars Kiesow <lk...@uos.de> wrote:
> Hi everyone,
> I was wondering if it is possible to automatically start `log:tail`
> whenever Karaf is launched. It would be nice to have that on out
> development distribution.
>
> I have already tired adding `log:tail` to `etc/shell.init.script` but
> when I launch Karaf, I will then get the following error:
>
> Error in initialization script: Command not found: log:tail
>
> I guess the script is executed before the logging stuff is loaded.
> Does anyone know if there is a way to do that?
>
> Best regards,
> Lars Kiesow
Re: Automatically Launching `log:tail`
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lars,
I think we are not so far ;)
We should use Java primitives there, like $.commands.contains() or so.
Regards
JB
On 02/03/2016 05:59 PM, Lars Kiesow wrote:
> Hi JB,
> thanks for the answer. Sadly, when I add that to the init script I get:
>
> Error in initialization script: Command not found: grep
>
> Could it be the problem that we are still using Karaf 3.0.5?
>
> Regards,
> Lars
>
>
> On Tue, 2 Feb 2016 15:20:16 +0100
> Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>
>> Hi Lars,
>>
>> you can do it with shell.init.script, but you have to check that the
>> log:tail command is there before actually executing it.
>>
>> The $.commands give you the list of commands available in the session.
>>
>> So, shell.init.script can contain something like:
>>
>> log:tail-boot = {
>> c = ($.commands | grep -i log:tail);
>> while ( $c isEmpty ) {
>> sleep 10
>> }
>> log:tail
>> }
>> log:tail-boot
>>
>> Regards
>> JB
>>
>> On 02/02/2016 03:11 PM, Lars Kiesow wrote:
>>> Hi,
>>> sine this is still annoying me:
>>> Does anyone know if it is possible?
>>> Regards,
>>> Lars
>>>
>>> On Wed, 4 Nov 2015 19:50:33 +0100
>>> Lars Kiesow <lk...@uos.de> wrote:
>>>
>>>> Hi everyone,
>>>> I was wondering if it is possible to automatically start `log:tail`
>>>> whenever Karaf is launched. It would be nice to have that on out
>>>> development distribution.
>>>>
>>>> I have already tired adding `log:tail` to `etc/shell.init.script`
>>>> but when I launch Karaf, I will then get the following error:
>>>>
>>>> Error in initialization script: Command not found: log:tail
>>>>
>>>> I guess the script is executed before the logging stuff is loaded.
>>>> Does anyone know if there is a way to do that?
>>>>
>>>> Best regards,
>>>> Lars Kiesow
>>>
>>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Automatically Launching `log:tail`
Posted by Lars Kiesow <lk...@uos.de>.
Hi JB,
thanks for the answer. Sadly, when I add that to the init script I get:
Error in initialization script: Command not found: grep
Could it be the problem that we are still using Karaf 3.0.5?
Regards,
Lars
On Tue, 2 Feb 2016 15:20:16 +0100
Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Hi Lars,
>
> you can do it with shell.init.script, but you have to check that the
> log:tail command is there before actually executing it.
>
> The $.commands give you the list of commands available in the session.
>
> So, shell.init.script can contain something like:
>
> log:tail-boot = {
> c = ($.commands | grep -i log:tail);
> while ( $c isEmpty ) {
> sleep 10
> }
> log:tail
> }
> log:tail-boot
>
> Regards
> JB
>
> On 02/02/2016 03:11 PM, Lars Kiesow wrote:
> > Hi,
> > sine this is still annoying me:
> > Does anyone know if it is possible?
> > Regards,
> > Lars
> >
> > On Wed, 4 Nov 2015 19:50:33 +0100
> > Lars Kiesow <lk...@uos.de> wrote:
> >
> >> Hi everyone,
> >> I was wondering if it is possible to automatically start `log:tail`
> >> whenever Karaf is launched. It would be nice to have that on out
> >> development distribution.
> >>
> >> I have already tired adding `log:tail` to `etc/shell.init.script`
> >> but when I launch Karaf, I will then get the following error:
> >>
> >> Error in initialization script: Command not found: log:tail
> >>
> >> I guess the script is executed before the logging stuff is loaded.
> >> Does anyone know if there is a way to do that?
> >>
> >> Best regards,
> >> Lars Kiesow
> >
>
Re: Automatically Launching `log:tail`
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lars,
you can do it with shell.init.script, but you have to check that the
log:tail command is there before actually executing it.
The $.commands give you the list of commands available in the session.
So, shell.init.script can contain something like:
log:tail-boot = {
c = ($.commands | grep -i log:tail);
while ( $c isEmpty ) {
sleep 10
}
log:tail
}
log:tail-boot
Regards
JB
On 02/02/2016 03:11 PM, Lars Kiesow wrote:
> Hi,
> sine this is still annoying me:
> Does anyone know if it is possible?
> Regards,
> Lars
>
> On Wed, 4 Nov 2015 19:50:33 +0100
> Lars Kiesow <lk...@uos.de> wrote:
>
>> Hi everyone,
>> I was wondering if it is possible to automatically start `log:tail`
>> whenever Karaf is launched. It would be nice to have that on out
>> development distribution.
>>
>> I have already tired adding `log:tail` to `etc/shell.init.script` but
>> when I launch Karaf, I will then get the following error:
>>
>> Error in initialization script: Command not found: log:tail
>>
>> I guess the script is executed before the logging stuff is loaded.
>> Does anyone know if there is a way to do that?
>>
>> Best regards,
>> Lars Kiesow
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com