#region Apache Notice
/*****************************************************************************
* $Header: $
* $Revision$
* $Date$
*
* iBATIS.NET Data Mapper
* Copyright (C) 2004 - Gilles Bayon
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
********************************************************************************/
#endregion
using System;
using System.Collections.Specialized;
namespace IBatisNet.Common.Logging.Impl
{
///
/// Factory for creating "no operation" loggers that do nothing and whose Is*Enabled properties always
/// return false.
///
///
/// This factory creates a single instance of and always returns that
/// instance whenever an instance is requested.
///
public sealed class NoOpLoggerFA : ILoggerFactoryAdapter
{
private ILog _nopLogger = new NoOpLogger();
///
/// Constructor
///
public NoOpLoggerFA()
{
// empty
}
///
/// Constructor
///
public NoOpLoggerFA(NameValueCollection properties)
{
// empty
}
#region ILoggerFactoryAdapter Members
///
/// Get a ILog instance by type
///
///
///
public ILog GetLogger(Type type)
{
return _nopLogger;
}
///
/// Get a ILog instance by type name
///
///
///
ILog ILoggerFactoryAdapter.GetLogger(string name)
{
return _nopLogger;
}
#endregion
}
}