有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

JAIN SIP上的java启用调试日志(NIST实现)

我正在开发一个基于JAIN SIP和NIST实现的Java应用程序,并希望启用/查看SIP堆栈调试

我找不到一个有效的方法来实现这一点——任何帮助都将不胜感激

谢谢! 乔


共 (2) 个答案

  1. # 1 楼答案

    试试这个

        Properties properties = new Properties();
        properties.setProperty("com.g5.javax.sip.STACK_NAME",Profile.getUserName());
        properties.setProperty("com.g5.javax.sip.IP_ADDRESS", Profile.getProxyIp());
    
        // DEBUGGING: Information will go to files
    
        properties.setProperty("gov.nist.javax.sip.TRACE_LEVEL", "32");
        properties.setProperty("gov.nist.javax.sip.SERVER_LOG",
                "textclient.txt");
        properties.setProperty("gov.nist.javax.sip.DEBUG_LOG",
                "textclientdebug.log");
        try{
            sipStack = sipFactory.createSipStack(properties);
    
        }catch(Exception e){
            System.out.println(e.getMessage());
        }
    
  2. # 2 楼答案

    初始化堆栈时,请尝试传递以下属性

    gov.nist.javax.sip.LOG_MESSAGE_CONTENT=true
    gov.nist.javax.sip.TRACE_LEVEL=32
    gov.nist.javax.sip.DEBUG_LOG=logs/mss-jsip-debuglog.txt
    gov.nist.javax.sip.SERVER_LOG=logs/mss-jsip-messages.xml