---
title: "log4j 配置导致的性能问题"
author: "stephen80"
date: "2009-04-03T18:02:49Z"
tags: [".net", "Apache", "Eclipse", "HTML", "log4j"]
categories: ["编程语言"]
slug: "log4j"
draft: false
lastmod: "2010-06-04T17:33:46Z"
id: 361163
url: "https://stephen80.iteye.com/blog/361163"
---

cpu 占用居高不下。
问题是，log4j 的配置不当。
参看：
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html

pattern L M 应该只在 debug 级别使用，呵呵。
stack 也是。

参见： http://weblogs.java.net/blog/zarar/archive/2005/11/sneaky_sneaky_l.html

eclipse 下如何link 外部文件。

Eclipse really wants to create a project directory to hold its metadata. However, there's nothing that stops you from having a folder "within" a project but located outside of it.

File -> New Project

then

File -> New Folder, click "Advanced" and select "Link to folder in the file system".

I'd suggest you avoid linking folders that exist as subdirectories of your workspace directory. Linking something that's a subdirectory of a workspace directory will lead to a world of pain and resources being out of sync.
 