---
title: "log4j手动加载配置文件"
author: "dingjun1"
date: "2008-09-10T15:26:29Z"
tags: []
slug: "log4j"
draft: false
lastmod: "2008-09-10T15:26:29Z"
id: 240223
url: "https://dingjun1.iteye.com/blog/240223"
---

```java

PropertyConfigurator.configureAndWatch("D:\\workspace\\TestSummer\\src\\log4j.properties",50);
		

```


或者

```java

PropertyConfigurator.configure(TestUserLogic.class.getClassLoader()
.getResource("log4j.properties"));

```