diff options
author | Henri Herscher <henri@oreka.org> | 2005-10-20 13:46:56 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2005-10-20 13:46:56 +0000 |
commit | 25c5446b5e0ab6d534203097b351699b1a769c6a (patch) | |
tree | 460bce79c944aa65151a358df5bd3c26af35513c /orkweb/src/net/sf/oreka/services/Startup.java | |
parent | 7e1d63dd9fd149e4934bf77095c8610fac786b04 (diff) |
first checkin
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@3 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkweb/src/net/sf/oreka/services/Startup.java')
-rw-r--r-- | orkweb/src/net/sf/oreka/services/Startup.java | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/orkweb/src/net/sf/oreka/services/Startup.java b/orkweb/src/net/sf/oreka/services/Startup.java new file mode 100644 index 0000000..337734f --- /dev/null +++ b/orkweb/src/net/sf/oreka/services/Startup.java @@ -0,0 +1,66 @@ +/* + * Oreka -- A media capture and retrieval platform + * + * Copyright (C) 2005, orecx LLC + * + * http://www.orecx.com + * + * This program is free software, distributed under the terms of + * the GNU General Public License. + * Please refer to http://www.gnu.org/copyleft/gpl.html + * + */ + +/** + * + */ +package net.sf.oreka.services; + +import java.util.*; +import java.io.*; +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.apache.log4j.PropertyConfigurator; + +public class Startup { + + static Logger logger = Logger.getLogger(Startup.class); + + public Startup() { + + logger.log(Level.WARN, "Initializing orkweb"); + + InputStream is = this.getClass().getClassLoader().getResourceAsStream("log4j.properties"); + if (is != null) + { + Properties properties = new Properties(); + try + { + properties.load(is); + PropertyConfigurator.configure(properties); + } + catch (IOException e) + { + logger.log(Level.INFO, "log4j.properties not found"); + } + } + + //PropertyConfigurator.configure("log4j.properties"); + + /* + //InputStream s = ClassLoader.getSystemResourceAsStream("toto.txt"); + InputStream s = this.getClass().getClassLoader().getResourceAsStream("toto.txt"); + if (s != null) + { + logger.log(Level.INFO, "~~~~~~~~ yes"); + } + else + { + logger.log(Level.INFO, "~~~~~~~~ no"); + } + */ + + + } + +} |