35 lines
654 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace skyscraper8.Skyscraper.Plugins
{
public class PluginLogManager
{
private PluginLogManager() { }
private static Dictionary<Type, PluginLogger> knownLoggers;
public static PluginLogger GetLogger(Type type)
{
if (knownLoggers == null)
{
knownLoggers = new Dictionary<Type, PluginLogger>();
}
if (knownLoggers.ContainsKey(type))
{
return knownLoggers[type];
}
else
{
PluginLogger child = new PluginLogger(type);
knownLoggers.Add(type, child);
return child;
}
}
}
}