logging output adjustments

This commit is contained in:
Gered 2013-08-22 18:36:16 -04:00
parent d6809cadb5
commit 166c735640

View file

@ -5,7 +5,15 @@ namespace Blarg.GameFramework
{
public class ServiceContainer : IDisposable
{
Dictionary<Type, object> _services = new Dictionary<Type, object>();
const string LOG_TAG = "SERVICES";
Dictionary<Type, object> _services;
public ServiceContainer()
{
_services = new Dictionary<Type, object>();
Platform.Logger.Debug(LOG_TAG, "Ready for use.");
}
public void Register(object service)
{
@ -22,7 +30,7 @@ namespace Blarg.GameFramework
((IService)service).OnRegister();
_services.Add(type, service);
Platform.Logger.Debug("ServiceContainer", "Registered object of type {0}.", type);
Platform.Logger.Debug(LOG_TAG, "Registered object of type {0}.", type);
}
public void Unregister(object service)
@ -42,7 +50,7 @@ namespace Blarg.GameFramework
throw new InvalidOperationException("This is not the service object that was registered under this type.");
_services.Remove(type);
Platform.Logger.Debug("ServiceContainer", "Unregistered object of type {0}.", type);
Platform.Logger.Debug(LOG_TAG, "Unregistered object of type {0}.", type);
if (registeredService is IService)
@ -67,7 +75,7 @@ namespace Blarg.GameFramework
public void Dispose()
{
Platform.Logger.Debug("ServiceContainer", "Disposing.");
Platform.Logger.Debug(LOG_TAG, "Disposing.");
foreach (var i in _services)
{