#region Apache License
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to you 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 log4net.Core;
using log4net.Repository;
namespace log4net.Core
{
///
/// Interface that all loggers implement
///
///
///
/// This interface supports logging events and testing if a level
/// is enabled for logging.
///
///
/// These methods will not throw exceptions. Note to implementor, ensure
/// that the implementation of these methods cannot allow an exception
/// to be thrown to the caller.
///
///
/// Nicko Cadell
/// Gert Driesen
public interface ILogger
{
///
/// Gets the name of the logger.
///
///
/// The name of the logger.
///
///
///
/// The name of this logger
///
///
string Name { get; }
///
/// This generic form is intended to be used by wrappers.
///
/// The declaring type of the method that is
/// the stack boundary into the logging system for this call.
/// The level of the message to be logged.
/// The message object to log.
/// the exception to log, including its stack trace. Pass null to not log an exception.
///
///
/// Generates a logging event for the specified using
/// the and .
///
///
void Log(Type callerStackBoundaryDeclaringType, Level level, object message, Exception exception);
///
/// This is the most generic printing method that is intended to be used
/// by wrappers.
///
/// The event being logged.
///
///
/// Logs the specified logging event through this logger.
///
///
void Log(LoggingEvent logEvent);
///
/// Checks if this logger is enabled for a given passed as parameter.
///
/// The level to check.
///
/// true if this logger is enabled for level, otherwise false.
///
///
///
/// Test if this logger is going to log events of the specified .
///
///
bool IsEnabledFor(Level level);
///
/// Gets the where this
/// Logger instance is attached to.
///
///
/// The that this logger belongs to.
///
///
///
/// Gets the where this
/// Logger instance is attached to.
///
///
ILoggerRepository Repository { get; }
}
}