I am implementing a custom ILogger (interface for logging). I have succesfully developed implementations of it with some famous loggers like Serilog or Log4Net. Now I want to create a memory logger that stores all the logs inside a List (memory).
Since the List will only exist in the MemoryLogger:ILogger , I think that making it part of the contract of ILogger will be a bad workaround. I need some ideas about how to make that List accessible from the ILogger because it will be used in some Asserts in unit testing, for example. Do you have any ideas? Any workarounds?