隨筆 - 6  文章 - 129  trackbacks - 0
          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          常用鏈接

          留言簿(14)

          隨筆檔案(6)

          文章分類(467)

          文章檔案(423)

          相冊(cè)

          收藏夾(18)

          JAVA

          搜索

          •  

          積分與排名

          • 積分 - 827218
          • 排名 - 49

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          運(yùn)行控制臺(tái)打印:(只在控制臺(tái)上,不在.log文件中)
          log4j:WARN No appenders could be found for logger (myrcp.OpenViewAction).
          log4j:WARN Please initialize the log4j system properly.
          這是因?yàn)闆]有添加Log4j的配置信息。
          在啟動(dòng)RCP的插件中的start方法里:
              public void start(BundleContext context) throws Exception {
                  super.start(context);
                  plugin = this;       
                  Properties prop = new Properties();
                  try {
                      prop.load(Activator.class.getResourceAsStream("log4j.properties")); //$NON-NLS-1$
                  } catch (IOException e) {
                      // e.printStackTrace();
                  }
                  PropertyConfigurator.configure(prop);
              }
          在myrcp.Activator同級(jí)目錄下添加log4j.properties: 


          posted on 2012-04-28 17:56 Ke 閱讀(975) 評(píng)論(0)  編輯  收藏 所屬分類: eclipse RCP 、log4j
          主站蜘蛛池模板: 湛江市| 阳东县| 米林县| 台南县| 林州市| 玉田县| 达州市| 蓬溪县| 宁夏| 鄂州市| 开原市| 莒南县| 阿坝县| 桃江县| 从化市| 自贡市| 内乡县| 平潭县| 明光市| 磐石市| 刚察县| 修文县| 鄱阳县| 娱乐| 枣阳市| 宁陵县| 霍城县| 长沙市| 安新县| 云梦县| 精河县| 文成县| 屯昌县| 青龙| 浦东新区| 昭觉县| 江津市| 措勤县| 勐海县| 墨竹工卡县| 碌曲县|