00001 /* 00002 * OpenMobileIS - a free Java Framework for mobile applications 00003 * 00004 * Copyright (C) 2002 Philippe Delrieu. 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public 00017 * License along with this library; if not, write to the Free 00018 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 * 00020 * Philippe Delrieu kept the rigth to distribute all code Copyrighted by philippe Delrieu 00021 * under other licence term even commercial one. 00022 * 00023 * Modifications : 00024 * 2002 Creation P.Delrieu 00025 * 00026 */ 00027 00028 package org.openmobileis.common.util.log; 00029 00030 import java.io.File; 00031 import java.util.Properties; 00032 00033 import org.openmobileis.common.context.ApplicationContextManager; 00043 public class FileOpenCloseLogManager extends LogManager { 00044 00045 protected FileOpenCloseLogManager(Properties props) { 00046 // super(props); 00047 tracer = new FileOpenCloseLogTracer(); 00048 tracer.setLogTracerProperties(props); 00049 } 00050 00051 public synchronized static LogManager getInstance(Properties props) { 00052 if ( instance == null ) { 00053 instance = new FileOpenCloseLogManager(props); 00054 ApplicationContextManager.getManager().addManager(instance); 00055 } 00056 return instance; 00057 } 00058 00059 public File getLogFile() { 00060 return ((FileOpenCloseLogTracer)tracer).getLogFile(); 00061 } 00062 }