Can't capture Apache Karaf client output

元气小坏坏 提交于 2019-12-05 05:55:11

To make Aviv's solution work, simply use a pipe, e.g. "bundle:list | tac -f /tmp/yourfile"

I'm able to capture client output in Karaf version 3.0.2 .

user@hostname:~$ client bundle:list > bundleinfo.txt

This results in following debug info on the console:

2053 [sshd-SshClient[36c8e545]-nio2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at [/0.0.0.0:8101, DSA, xx:xx:xx:xx:xx:xx:xx:c 2:3a:5a:9b:87:ed:e0:b2:6a] presented unverified {} key: {}

..and of course the bundleinfo.txt file with content as expected:

user@hostname:~$ head -5 bundleinfo.txt
START LEVEL 100 , List Threshold: 50
 ID | State    | Lvl | Version                 | Name
---------------------------------------------------------------------------------------------
38 | Active   |  80 | 3.2.5.RELEASE           | Spring Security Core
39 | Active   |  80 | 1.0.0.1                 | Apache ServiceMix :: Bundles :: javax.inject

For command line, I use "tac" and redirect to a file with -f , in Karaf 3.0.3, try it or learn what it does with --help

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!