using System;
using MediaBrowser.Model.Logging;
using ServiceStack.Logging;
namespace MediaBrowser.Server.Implementations.HttpServer
{
///
/// Class ServerLogFactory
///
public class ServerLogFactory : ILogFactory
{
///
/// The _log manager
///
private readonly ILogManager _logManager;
///
/// Initializes a new instance of the class.
///
/// The log manager.
public ServerLogFactory(ILogManager logManager)
{
_logManager = logManager;
}
///
/// Gets the logger.
///
/// Name of the type.
/// ILog.
public ILog GetLogger(string typeName)
{
return new ServerLogger(_logManager.GetLogger(typeName));
}
///
/// Gets the logger.
///
/// The type.
/// ILog.
public ILog GetLogger(Type type)
{
return GetLogger(type.Name);
}
}
}