diff --git a/NoteHub.cs b/NoteHub.cs index 5e84bbc..5aff2f7 100644 --- a/NoteHub.cs +++ b/NoteHub.cs @@ -8,10 +8,12 @@ namespace BinaryDad.Notes public class NoteHub : Hub { private readonly INoteService noteService; + private readonly ILogger logger; - public NoteHub(INoteService noteService) + public NoteHub(INoteService noteService, ILogger logger) { this.noteService = noteService; + this.logger = logger; } public override Task OnConnectedAsync() @@ -25,6 +27,8 @@ namespace BinaryDad.Notes public async Task SaveNote(string content, string noteName) { + logger.LogInformation($"Saving note \"{noteName}\""); + noteService.SaveNote(content, noteName); // find all other connections except for the current one