// Copyright 2003-2004 The Apache Software Foundation // // 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. namespace Apache.Avalon.Composition.Logging { using System; using Apache.Avalon.Composition.Data; /// Description of a top level logging system. /// ///

XML

///

A logging element declares the top level defaults for priority and target name, a set of /// targets to which logging events shall be directed. /// The logging element declares the application wide default logging priority. /// A target element enables defintion of a logging file to which log entries will /// be directed. The target name attribute is the name referenced by category elements /// defined within the loggers element. The priority attribute may container one of the values /// DEBUG, INFO, WARN or ERROR. /// The target must contain a single file element with the attribute location /// the corresponds to the name of the logging file.

/// ///
	/// <!--
	/// Definition of a logging system.
	/// -->
	/// 
	/// <logging name="" priority="INFO" target="kernel">
	/// <category name="logging" priority="WARN"/>
	/// <target name="kernel">
	/// <file location="kernel.log" />
	/// </target>
	/// </logging>
	/// 
/// ///
/// /// /// Avalon Development Team /// /// $Revision: 1.2 $ $Date: 2004/02/28 22:15:37 $ /// public sealed class LoggingDescriptor : CategoriesDirective { /// The dependencies keyed by role name. private TargetDescriptor[] m_targets; /// Create a LoggingDescriptor instance. public LoggingDescriptor():this("", null, null, new CategoryDirective[0], new TargetDescriptor[0]) { } /// /// Create a LoggingDescriptor instance. /// /// the root logger category name /// /// the default logging priority /// /// the default logging target /// /// the system categories /// /// the set of logging targets /// public LoggingDescriptor(System.String root, System.String priority, System.String target, CategoryDirective[] categories, TargetDescriptor[] targets):base(root, priority, target, categories) { if (targets == null) { m_targets = new TargetDescriptor[0]; } else { m_targets = targets; } } /// /// Return the set of logging target descriptors. /// /// the target descriptors /// public TargetDescriptor[] TargetDescriptors { get { return m_targets; } } } }