You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by ni...@apache.org on 2004/02/26 22:02:58 UTC
cvs commit: logging-log4net/src/Core LoggerManager.cs
nicko 2004/02/26 13:02:58
Modified: src LogManager.cs
src/Config BasicConfigurator.cs XmlConfigurator.cs
src/Core LoggerManager.cs
Log:
Obsoleted GetLoggerRepository and added GetRepository
Revision Changes Path
1.3 +53 -3 logging-log4net/src/LogManager.cs
Index: LogManager.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/LogManager.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LogManager.cs 16 Feb 2004 02:10:51 -0000 1.2
+++ LogManager.cs 26 Feb 2004 21:02:57 -0000 1.3
@@ -442,9 +442,10 @@
/// </para>
/// </remarks>
/// <returns>The <see cref="ILoggerRepository"/> instance for the default repository.</returns>
+ [Obsolete("Use GetRepository instead of GetLoggerRepository")]
public static ILoggerRepository GetLoggerRepository()
{
- return GetLoggerRepository(Assembly.GetCallingAssembly());
+ return GetRepository(Assembly.GetCallingAssembly());
}
/// <summary>
@@ -458,9 +459,10 @@
/// </para>
/// </remarks>
/// <param name="repository">The repository to lookup in.</param>
+ [Obsolete("Use GetRepository instead of GetLoggerRepository")]
public static ILoggerRepository GetLoggerRepository(string repository)
{
- return LoggerManager.GetLoggerRepository(repository);
+ return GetRepository(repository);
}
/// <summary>
@@ -474,9 +476,57 @@
/// </para>
/// </remarks>
/// <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
+ [Obsolete("Use GetRepository instead of GetLoggerRepository")]
public static ILoggerRepository GetLoggerRepository(Assembly repositoryAssembly)
{
- return LoggerManager.GetLoggerRepository(repositoryAssembly);
+ return GetRepository(repositoryAssembly);
+ }
+
+ /// <summary>
+ /// Returns the default <see cref="ILoggerRepository"/> instance.
+ /// </summary>
+ /// <remarks>
+ /// <para>
+ /// Gets the <see cref="ILoggerRepository"/> for the repository specified
+ /// by the callers assembly (<see cref="Assembly.GetCallingAssembly()"/>).
+ /// </para>
+ /// </remarks>
+ /// <returns>The <see cref="ILoggerRepository"/> instance for the default repository.</returns>
+ public static ILoggerRepository GetRepository()
+ {
+ return GetRepository(Assembly.GetCallingAssembly());
+ }
+
+ /// <summary>
+ /// Returns the default <see cref="ILoggerRepository"/> instance.
+ /// </summary>
+ /// <returns>The default <see cref="ILoggerRepository"/> instance.</returns>
+ /// <remarks>
+ /// <para>
+ /// Gets the <see cref="ILoggerRepository"/> for the repository specified
+ /// by the <paramref name="repository"/> argument.
+ /// </para>
+ /// </remarks>
+ /// <param name="repository">The repository to lookup in.</param>
+ public static ILoggerRepository GetRepository(string repository)
+ {
+ return LoggerManager.GetRepository(repository);
+ }
+
+ /// <summary>
+ /// Returns the default <see cref="ILoggerRepository"/> instance.
+ /// </summary>
+ /// <returns>The default <see cref="ILoggerRepository"/> instance.</returns>
+ /// <remarks>
+ /// <para>
+ /// Gets the <see cref="ILoggerRepository"/> for the repository specified
+ /// by the <paramref name="repositoryAssembly"/> argument.
+ /// </para>
+ /// </remarks>
+ /// <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
+ public static ILoggerRepository GetRepository(Assembly repositoryAssembly)
+ {
+ return LoggerManager.GetRepository(repositoryAssembly);
}
/// <summary>
1.3 +2 -2 logging-log4net/src/Config/BasicConfigurator.cs
Index: BasicConfigurator.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Config/BasicConfigurator.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BasicConfigurator.cs 16 Feb 2004 02:10:52 -0000 1.2
+++ BasicConfigurator.cs 26 Feb 2004 21:02:57 -0000 1.3
@@ -78,7 +78,7 @@
/// </remarks>
static public void Configure()
{
- BasicConfigurator.Configure(LogManager.GetLoggerRepository(Assembly.GetCallingAssembly()));
+ BasicConfigurator.Configure(LogManager.GetRepository(Assembly.GetCallingAssembly()));
}
/// <summary>
@@ -87,7 +87,7 @@
/// <param name="appender">The appender to use to log all logging events.</param>
static public void Configure(IAppender appender)
{
- BasicConfigurator.Configure(LogManager.GetLoggerRepository(Assembly.GetCallingAssembly()), appender);
+ BasicConfigurator.Configure(LogManager.GetRepository(Assembly.GetCallingAssembly()), appender);
}
/// <summary>
1.4 +5 -5 logging-log4net/src/Config/XmlConfigurator.cs
Index: XmlConfigurator.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Config/XmlConfigurator.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XmlConfigurator.cs 23 Feb 2004 03:18:03 -0000 1.3
+++ XmlConfigurator.cs 26 Feb 2004 21:02:57 -0000 1.4
@@ -65,7 +65,7 @@
/// </remarks>
static public void Configure()
{
- Configure(LogManager.GetLoggerRepository(Assembly.GetCallingAssembly()));
+ Configure(LogManager.GetRepository(Assembly.GetCallingAssembly()));
}
/// <summary>
@@ -129,7 +129,7 @@
/// <param name="element">The element to parse.</param>
static public void Configure(XmlElement element)
{
- ConfigureFromXml(LogManager.GetLoggerRepository(Assembly.GetCallingAssembly()), element);
+ ConfigureFromXml(LogManager.GetRepository(Assembly.GetCallingAssembly()), element);
}
/// <summary>
@@ -190,7 +190,7 @@
/// </remarks>
static public void Configure(FileInfo configFile)
{
- Configure(LogManager.GetLoggerRepository(Assembly.GetCallingAssembly()), configFile);
+ Configure(LogManager.GetRepository(Assembly.GetCallingAssembly()), configFile);
}
/// <summary>
@@ -209,7 +209,7 @@
/// </remarks>
static public void Configure(Stream configStream)
{
- Configure(LogManager.GetLoggerRepository(Assembly.GetCallingAssembly()), configStream);
+ Configure(LogManager.GetRepository(Assembly.GetCallingAssembly()), configStream);
}
/// <summary>
@@ -418,7 +418,7 @@
/// <seealso cref="Configure(FileInfo)"/>
static public void ConfigureAndWatch(FileInfo configFile)
{
- ConfigureAndWatch(LogManager.GetLoggerRepository(Assembly.GetCallingAssembly()), configFile);
+ ConfigureAndWatch(LogManager.GetRepository(Assembly.GetCallingAssembly()), configFile);
}
/// <summary>
1.4 +27 -1 logging-log4net/src/Core/LoggerManager.cs
Index: LoggerManager.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Core/LoggerManager.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LoggerManager.cs 23 Feb 2004 03:18:03 -0000 1.3
+++ LoggerManager.cs 26 Feb 2004 21:02:58 -0000 1.4
@@ -127,8 +127,34 @@
/// <para>Gets the <see cref="ILoggerRepository"/> for the repository specified
/// by the <paramref name="repository"/> argument.</para>
/// </remarks>
+ [Obsolete("Use GetRepository instead of GetLoggerRepository")]
public static ILoggerRepository GetLoggerRepository(string repository)
{
+ return GetRepository(repository);
+ }
+
+ /// <summary>
+ /// Returns the default <see cref="ILoggerRepository"/> instance.
+ /// </summary>
+ /// <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
+ /// <returns>The default <see cref="ILoggerRepository"/> instance.</returns>
+ [Obsolete("Use GetRepository instead of GetLoggerRepository")]
+ public static ILoggerRepository GetLoggerRepository(Assembly repositoryAssembly)
+ {
+ return GetRepository(repositoryAssembly);
+ }
+
+ /// <summary>
+ /// Return the default <see cref="ILoggerRepository"/> instance.
+ /// </summary>
+ /// <param name="repository">the repository to lookup in</param>
+ /// <returns>Return the default <see cref="ILoggerRepository"/> instance</returns>
+ /// <remarks>
+ /// <para>Gets the <see cref="ILoggerRepository"/> for the repository specified
+ /// by the <paramref name="repository"/> argument.</para>
+ /// </remarks>
+ public static ILoggerRepository GetRepository(string repository)
+ {
if (repository == null)
{
throw new ArgumentNullException("repository");
@@ -141,7 +167,7 @@
/// </summary>
/// <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
/// <returns>The default <see cref="ILoggerRepository"/> instance.</returns>
- public static ILoggerRepository GetLoggerRepository(Assembly repositoryAssembly)
+ public static ILoggerRepository GetRepository(Assembly repositoryAssembly)
{
if (repositoryAssembly == null)
{