using aaLogReader; namespace AaLog.Cli { /// One place to construct an aaLogReader so every command honors --log-dir the /// same way and inherits the library's defaults otherwise. internal static class LogReaderFactory { public static aaLogReader.aaLogReader Open(string logDirectoryOverride) { var options = new OptionsStruct(); if (!string.IsNullOrWhiteSpace(logDirectoryOverride)) { options.LogDirectory = logDirectoryOverride; } return new aaLogReader.aaLogReader(options); } } }