#region Copyright (C) 2003 Yuriy Baltovskyy <bym@itcs.com.ua>
/*
* Ormyx for .NET - Object Relational Mapping
* Copyright (C) 2003 Yuriy Baltovskyy
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#endregion
using System;
using log4net;
using log4net.Config;
namespace Ormyx.Net.Util.Log{
/// <summary>
/// Summary description for LoggerFactory.
/// </summary>
public class LoggerFactory : ILoggerFactory
{
private static ILoggerFactory _instance;
private LoggerFactory()
{
DOMConfigurator.Configure();
}
public static ILoggerFactory Instance
{
get
{
if(_instance == null)
lock(typeof(LoggerFactory))
{
if(_instance == null)
_instance = new LoggerFactory();
}
return _instance;
}
set
{
lock(typeof(LoggerFactory))
{
_instance = value;
}
}
}
public ILog GetLogger(System.Type type)
{
return LogManager.GetLogger(type);
}
public ILog GetLogger(string name)
{
return LogManager.GetLogger(name);
}
}
}
|