Shameless bump to give this one more chance;) I've been reading the
documentation on custom commands, but nothing is jumping out...
Just to be clear on what I need. I need to automatically run
diagnostics after all my OSGi bundles have loaded. The results need
to be displayed to the user in
As I explained the prompt only deals with commands. If you print
anything on the console and if you want the prompt to be displayed
again. I think the only way would be to create a shell session, and
then print the prompt that can be retrieved by calling
Console#getPrompt(), see
Thanks for both of the suggestions, but my initial impression is I'd
have to hold off on investigating those now. Currently, I don't have
any investment in Karaf-specific stuff other than the commands, which
are a normal extension point.
That said, my last question... Is there any way to
I tried that and it didn't work. I will say that my bean doing the
output is written in Scala. I'm using println(), which I think is
equivalent to Java's System.out.println().
On Sat, May 14, 2011 at 12:38 AM, Jean-Baptiste Onofré j...@nanthrax.net
wrote:
Hi Samuel,
It should be the case.
The prompt is displayed when the execution of a command is finished.
If you're still executing the command, the prompt won't be dipslayed,
but you can retrieve it from the shell's session variables and display
it your self if you need.
On Sat, May 14, 2011 at 14:32, Samuel Cox
I'm not executing a command. We do have our own commands, and they
work fine. This is just a bean in some bundle that displays some
diagnostics on startup. If there is a way to execute a command
automatically when a bundle starts, I could print the diagnostics
using that. I couldn't find any
Hi Samuel,
It should be the case.
Karaf shell intercept the std and err output stream.
It means that after a System.out.println(), the Karaf prompt should be
display.
It's the case in the commands. For instance, osgi:list iterates on the
bundles and simply display the bundles attribute using