Exemple #1
0
        protected override int Run(TextWriter cout)
        {
            try
            {
                var config = SeqForwarderConfig.Read(_storagePath.ConfigFilePath);
                var buffer = new LogBuffer(_storagePath.BufferPath, config.Storage.BufferSizeBytes);
                buffer.Truncate();
                return(0);
            }
            catch (Exception ex)
            {
                var logger = new LoggerConfiguration().WriteTo.LiterateConsole().CreateLogger();

                logger.Fatal(ex, "Could not truncate log buffer");
                return(1);
            }
        }