<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://www.typea.info/tips_/index.php?action=history&amp;feed=atom&amp;title=Log4j%E8%A8%AD%E5%AE%9A</id>
	<title>Log4j設定 - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://www.typea.info/tips_/index.php?action=history&amp;feed=atom&amp;title=Log4j%E8%A8%AD%E5%AE%9A"/>
	<link rel="alternate" type="text/html" href="https://www.typea.info/tips_/index.php?title=Log4j%E8%A8%AD%E5%AE%9A&amp;action=history"/>
	<updated>2026-04-30T03:59:10Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://www.typea.info/tips_/index.php?title=Log4j%E8%A8%AD%E5%AE%9A&amp;diff=6345&amp;oldid=prev</id>
		<title>2020年2月16日 (日) 04:29にPirotoによる</title>
		<link rel="alternate" type="text/html" href="https://www.typea.info/tips_/index.php?title=Log4j%E8%A8%AD%E5%AE%9A&amp;diff=6345&amp;oldid=prev"/>
		<updated>2020-02-16T04:29:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2020年2月16日 (日) 04:29時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot; &gt;8行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;8行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MMM-dd HH:mm:ss} %5p - %m%n&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MMM-dd HH:mm:ss} %5p - %m%n&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ### &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DailyRolling &lt;/del&gt;Log ###&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ### &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Daily[[R]]olling &lt;/ins&gt;Log ###&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.dailyfile=org.apache.log4j.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;DailyRollingFileAppender&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.dailyfile=org.apache.log4j.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Daily[[R]]ollingFileAppender&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.dailyfile.File=c:/Program Files/eclipse3.1/workspace/fugitive/log/fugitive.log&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.dailyfile.File=c:/Program Files/eclipse3.1/workspace/fugitive/log/fugitive.log&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.dailyfile.DatePattern='.'yyyy-MM-dd  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.dailyfile.DatePattern='.'yyyy-MM-dd  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l15&quot; &gt;15行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;15行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.dailyfile.layout.ConversionPattern=%d{yyyy-MMM-dd HH:mm:ss} %5p - %m%n&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.dailyfile.layout.ConversionPattern=%d{yyyy-MMM-dd HH:mm:ss} %5p - %m%n&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ### &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Rolling &lt;/del&gt;Log ###&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ### &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[R]]olling &lt;/ins&gt;Log ###&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.rollfile=org.apache.log4j.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;RollingFileAppender&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.rollfile=org.apache.log4j.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[R]]ollingFileAppender&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.rollfile.File=c:/Program Files/eclipse3.1/workspace/fugitive/log/fugitive.log&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.rollfile.File=c:/Program Files/eclipse3.1/workspace/fugitive/log/fugitive.log&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.rollfile.MaxFileSize=5MB  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  log4j.appender.rollfile.MaxFileSize=5MB  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot; &gt;45行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;45行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        String url = &amp;quot;/&amp;quot; + LogUtil.class.getPackage().getName().replaceAll(&amp;quot;\\.&amp;quot;, &amp;quot;/&amp;quot;)  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        String url = &amp;quot;/&amp;quot; + LogUtil.class.getPackage().getName().replaceAll(&amp;quot;\\.&amp;quot;, &amp;quot;/&amp;quot;)  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                     + &amp;quot;/log4j.properties&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                     + &amp;quot;/log4j.properties&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        prop.load(LogUtil.class.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;getResourceAsStream&lt;/del&gt;(url));&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        prop.load(LogUtil.class.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;get[[R]]esourceAsStream&lt;/ins&gt;(url));&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        PropertyConfigurator.configure(prop);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;        PropertyConfigurator.configure(prop);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      } catch (Exception re) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      } catch (Exception re) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Piroto</name></author>
		
	</entry>
	<entry>
		<id>https://www.typea.info/tips_/index.php?title=Log4j%E8%A8%AD%E5%AE%9A&amp;diff=2254&amp;oldid=prev</id>
		<title>Piroto: ページの作成:「==log4j 設定==    ====log4j.properties 設定例====   ### Stdout ###   log4j.appender.stdout=org.apache.log4j.ConsoleAppender   log4j.appender.stdout.Target=System.out…」</title>
		<link rel="alternate" type="text/html" href="https://www.typea.info/tips_/index.php?title=Log4j%E8%A8%AD%E5%AE%9A&amp;diff=2254&amp;oldid=prev"/>
		<updated>2020-02-15T07:34:06Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「==log4j 設定==    ====log4j.properties 設定例====   ### Stdout ###   log4j.appender.stdout=org.apache.log4j.ConsoleAppender   log4j.appender.stdout.Target=System.out…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==log4j 設定==&lt;br /&gt;
&lt;br /&gt;
====log4j.properties 設定例====&lt;br /&gt;
 ### Stdout ###&lt;br /&gt;
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender&lt;br /&gt;
 log4j.appender.stdout.Target=System.out&lt;br /&gt;
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout&lt;br /&gt;
 log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MMM-dd HH:mm:ss} %5p - %m%n&lt;br /&gt;
 &lt;br /&gt;
 ### DailyRolling Log ###&lt;br /&gt;
 log4j.appender.dailyfile=org.apache.log4j.DailyRollingFileAppender&lt;br /&gt;
 log4j.appender.dailyfile.File=c:/Program Files/eclipse3.1/workspace/fugitive/log/fugitive.log&lt;br /&gt;
 log4j.appender.dailyfile.DatePattern='.'yyyy-MM-dd &lt;br /&gt;
 log4j.appender.dailyfile.layout=org.apache.log4j.PatternLayout&lt;br /&gt;
 log4j.appender.dailyfile.layout.ConversionPattern=%d{yyyy-MMM-dd HH:mm:ss} %5p - %m%n&lt;br /&gt;
 &lt;br /&gt;
 ### Rolling Log ###&lt;br /&gt;
 log4j.appender.rollfile=org.apache.log4j.RollingFileAppender&lt;br /&gt;
 log4j.appender.rollfile.File=c:/Program Files/eclipse3.1/workspace/fugitive/log/fugitive.log&lt;br /&gt;
 log4j.appender.rollfile.MaxFileSize=5MB &lt;br /&gt;
 log4j.appender.rollfile.MaxBackupIndex=5&lt;br /&gt;
 log4j.appender.rollfile.layout=org.apache.log4j.PatternLayout&lt;br /&gt;
 log4j.appender.rollfile.layout.ConversionPattern=%d{yyyy-MMM-dd HH:mm:ss} %5p - %m%n&lt;br /&gt;
 &lt;br /&gt;
 ### Logger Setting (for debugging)  ###&lt;br /&gt;
 #log4j.rootLogger=debug,stdout,rollfile&lt;br /&gt;
 #log4j.logger.info.typea.testApp=debug,stdout,rollfile&lt;br /&gt;
 &lt;br /&gt;
 ### Logger Setting  ###&lt;br /&gt;
 log4j.logger.info.typea.testApp=info,rollfile&lt;br /&gt;
 &lt;br /&gt;
====設定ファイルを指定する====&lt;br /&gt;
&lt;br /&gt;
http://www.nurs.or.jp/~sug/soft/log4j/log4j3.htm&lt;br /&gt;
&lt;br /&gt;
=====プログラム上で、明示的にプロパティファイルを指定するためのクラス。=====&lt;br /&gt;
 import java.util.Properties;&lt;br /&gt;
 import org.apache.log4j.Logger;&lt;br /&gt;
 import org.apache.log4j.PropertyConfigurator;&lt;br /&gt;
 &lt;br /&gt;
 public class LogUtil {&lt;br /&gt;
   static {&lt;br /&gt;
     try {&lt;br /&gt;
       Properties prop = new Properties();&lt;br /&gt;
       String url = &amp;quot;/&amp;quot; + LogUtil.class.getPackage().getName().replaceAll(&amp;quot;\\.&amp;quot;, &amp;quot;/&amp;quot;) &lt;br /&gt;
                    + &amp;quot;/log4j.properties&amp;quot;;&lt;br /&gt;
       prop.load(LogUtil.class.getResourceAsStream(url));&lt;br /&gt;
       PropertyConfigurator.configure(prop);&lt;br /&gt;
     } catch (Exception re) {&lt;br /&gt;
       re.printStackTrace();&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   private LogUtil() {}&lt;br /&gt;
   /**&lt;br /&gt;
    * Log4Jロガーを取得する&lt;br /&gt;
    * @param clazz&lt;br /&gt;
    * @return&lt;br /&gt;
    */&lt;br /&gt;
   public static Logger getLogger(Class clazz) {&lt;br /&gt;
     return Logger.getLogger(clazz);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=====使用法=====&lt;br /&gt;
 import org.apache.log4j.Logger;&lt;br /&gt;
 protected Logger log = LogUtil.getLogger(Dao.class);&lt;/div&gt;</summary>
		<author><name>Piroto</name></author>
		
	</entry>
</feed>