diff --git a/skullOS.Modules/Camera.cs b/skullOS.Modules/Camera.cs index 3dafd76..6a772cf 100644 --- a/skullOS.Modules/Camera.cs +++ b/skullOS.Modules/Camera.cs @@ -43,7 +43,7 @@ public Camera() public void TakePicture() { - logger.LogMessage($"({DateTime.Now}) Picture taken!"); //Maybe think about a better logging solution? + LogMessage($"({DateTime.Now}) Picture taken!"); CameraService.Camera.Capture($"{FileManager.GetSkullDirectory()}/Captures/{DateTime.Now:yyyyMMddHHmmss}.jpg"); } diff --git a/skullOS.Modules/Module.cs b/skullOS.Modules/Module.cs index 1d82011..64216a6 100644 --- a/skullOS.Modules/Module.cs +++ b/skullOS.Modules/Module.cs @@ -12,5 +12,13 @@ public void AttachLogger(SkullLogger logger) { this.logger = logger; } + + public void LogMessage(string message) + { + if (logger != null) + { + logger.LogMessage(message); + } + } } }