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

          常用鏈接

          留言簿(14)

          隨筆檔案(6)

          文章分類(467)

          文章檔案(423)

          相冊(cè)

          收藏夾(18)

          JAVA

          搜索

          •  

          積分與排名

          • 積分 - 827240
          • 排名 - 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 RCPlog4j
          主站蜘蛛池模板: 镇雄县| 康定县| 富源县| 西乌珠穆沁旗| 五家渠市| 古丈县| 门头沟区| 皮山县| 漠河县| 崇州市| 阿合奇县| 桐庐县| 荣昌县| 南雄市| 美姑县| 株洲市| 澄江县| 成都市| 莱芜市| 岳西县| 黄石市| 湖口县| 盐山县| 西畴县| 吉首市| 怀仁县| 富源县| 建瓯市| 深水埗区| 临桂县| 苗栗市| 富民县| 鞍山市| 桃源县| 邮箱| 桐柏县| 石棉县| 曲阳县| 岳西县| 温泉县| 通榆县|