// 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.Framework; using Apache.Avalon.Composition.Data; public struct ILoggingManager_Fields { /// Standard context key for the logging manager. public readonly static System.String KEY = "urn:assembly:logging"; /// The default logging priority value. public readonly static System.String DEFAULT_PRIORITY = "INFO"; /// The default logging target name. public readonly static System.String DEFAULT_TARGET = "default"; /// The default logging format. public readonly static System.String DEFAULT_FORMAT = "[%7.7{priority}] (%{category}): %{message}\\n%{throwable}"; } /// A LoggerManager that supports the management of a logging hierarchy. /// Avalon Development Team /// public interface ILoggingManager { /// Add a set of category entries using the supplied categories descriptor. /// a set of category descriptors to be added under the path /// void AddCategories(CategoriesDirective descriptor); /// Add a set of category entries relative to the supplied base category /// path, using the supplied descriptor as the definition of subcategories. /// /// the category base path /// /// a set of category descriptors to be added under /// the base path /// void AddCategories(System.String path, CategoriesDirective descriptor); /// Create a logging channel configured with the supplied category path, /// priority and target. /// /// /// logging category path /// /// the logging target to assign the channel to /// /// the priority level to assign to the channel /// /// the logging channel /// @throws Exception if an error occurs /// ILogger GetLoggerForCategory(System.String name, System.String target, System.String priority); /// Configure Logging channel based on the description supplied in a /// category descriptor. /// /// /// defintion of the channel category, priority and target /// /// the logging channel /// @throws Exception if an error occurs /// ILogger GetLoggerForCategory(CategoryDirective category); /// Return the Logger for the specified category. /// the category path /// /// the logging channel /// ILogger GetLoggerForCategory(System.String category); } }