Eliefly
V2EX  ›  Java

[求助] Java 普通命令行程序怎么关掉 DEBUG 打印

  •  
  •   Eliefly · Apr 26, 2018 · 4514 views
    This topic created in 2942 days ago, the information mentioned may be changed or developed.

    一个普通的 java 命令行执行程序,会使用 httpcliet 推送东西,然后终端满屏的 DEBUG 打印,包括传输的数据。 求助下怎么关掉这些打印。

    17:55:37.785 [main] DEBUG org.apache.http.wire - http-outgoing-2 >> "[\r][\n]"
    17:55:37.785 [main] DEBUG org.apache.http.wire - http-outgoing-2 >> "[0xb6][0xd4][0xd3][0xda][0xb7][0xa2][0xcb][0xcd][0xcf][0xfb][0xcf][0xa2][0xa3][0xba][0xce][0xd2][0xc3][0xc7][0xd2][0xbb][0xb0][0xe3][0xbf][0xc9][0xd2][0xd4][0xca][0xb9][0xd3][0xc3] RabbitTemplate[0xa3][0xac][0xd5][0xe2][0xb8][0xf6][0xca][0xc7] Spring [0xb7][0xe2][0xd7][0xb0][0xb8][0xf8][0xc1][0xcb][0xce][0xd2][0xc3][0xc7][0xa3][0xac][0xb1][0xe3][0xd3][0xda][0xce][0xd2][0xc3][0xc7][0xb7][0xa2][0xcb][0xcd][0xd0][0xc5][0xcf][0xa2][0xa3][0xac][0xce][0xd2][0xc3][0xc7][0xb5][0xf7][0xd3][0xc3] rabbitTemplate.convertAndSend("spring-boot", xxx); [0xbc][0xb4][0xbf][0xc9][0xb7][0xa2][0xcb][0xcd][0xd0][0xc5][0xcf][0xa2][0xa1][0xa3][\r][\n]"
    17:55:37.785 [main] DEBUG org.apache.http.wire - http-outgoing-2 >> "[0xb6][0xd4][0xd3][0xda][0xbd][0xbb][0xbb][0xbb][0xbb][0xfa][0xb6][0xd3][0xc1][0xd0][0xa3][0xba][0xc8][0xe7][0xc9][0xcf][0xb4][0xfa][0xc2][0xeb][0xa3][0xac][0xce][0xd2][0xc3][0xc7][0xd0][0xe8][0xd2][0xaa][0xc5][0xe4][0xd6][0xc3][0xbd][0xbb][0xbb][0xbb][0xbb][0xfa] TopicExchange[0xa3][0xac][0xc5][0xe4][0xd6][0xc3][0xb6][0xd3][0xc1][0xd0] Queue[0xa3][0xac][0xb2][0xa2][0xc7][0xd2][0xc5][0xe4][0xd6][0xc3][0xcb][0xfb
    
    4 replies    2018-04-27 13:36:38 +08:00
    wellCh4n
        1
    wellCh4n  
       Apr 26, 2018
    配置一下 logback 吧
    Eliefly
        2
    Eliefly  
    OP
       Apr 26, 2018
    @wellCh4n 谢谢答复,刚刚搞好了,IDEA 配置 Artifact 构建时把日志相关的 jar 全移除了,需要的打印用 System.out ,System.err 。
    letitbesqzr
        3
    letitbesqzr  
       Apr 26, 2018
    用 System.out 不用 log 是什么操作。。配置好 logback 不就行了么,最烦看到 System.out 了,不好管理。
    Eliefly
        4
    Eliefly  
    OP
       Apr 27, 2018
    @letitbesqzr 一个命令行小工具,没用到 spring 不知道怎么配置打印级别。打印也不多,用 System.out 可以啦。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2902 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 06:28 · PVG 14:28 · LAX 23:28 · JFK 02:28
    ♥ Do have faith in what you're doing.