怎么样才能写一个日志properites 能把日志写到两个不同的文件里去(急) 怎么样才能写一个properites文件! 能把日志写到两个不同的文件里去 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 import java.util.Properties;import java.io.*;public class test{ public static void main(String[] args) { try { Properties pro=new Properties(); FileOutputStream output=new FileOutputStream("d:\\1.properties"); FileOutputStream output2=new FileOutputStream("d:\\2.properties"); pro.setProperty("aaa", "aaaa"); pro.setProperty("bbb", "bbbb"); pro.store(output, "aaa"); pro.store(output2, "b"); output2.close(); output.close(); } catch (Exception e) { // TODO: handle exception System.out.println(e.getMessage()); } }} log4j.appender.FILEA=org.apache.log4j.RollingFileAppender这里继续添加对FILEA的定义log4j.appender.FILEB=org.apache.log4j.RollingFileAppender这里继续添加对FILEB的定义log4j.logger.com.you=FILEA,FILEB java编写数据库查询执行器的问题?求帮忙看下 当前窗口关闭问题 RandomAccessFile中seek方法是什么意思 今天碰到的机试题 大伙们请快进来 怎样获得删除的记录数呢? 编译参数问题? 如何创建一个无标题栏的窗口? jboss的配置 初学者求教,一个问题,高手请告诉我吧,谢谢了。 java文件传输问题,printWriter与流使用 关于HttpClient的问题
import java.io.*;
public class test{
public static void main(String[] args) {
try {
Properties pro=new Properties();
FileOutputStream output=new FileOutputStream("d:\\1.properties");
FileOutputStream output2=new FileOutputStream("d:\\2.properties");
pro.setProperty("aaa", "aaaa");
pro.setProperty("bbb", "bbbb");
pro.store(output, "aaa");
pro.store(output2, "b");
output2.close();
output.close();
} catch (Exception e) {
// TODO: handle exception
System.out.println(e.getMessage());
}
}
}
这里继续添加对FILEA的定义log4j.appender.FILEB=org.apache.log4j.RollingFileAppender
这里继续添加对FILEB的定义
log4j.logger.com.you=FILEA,FILEB