public static SeqForwarderConfig CreateDefaultConfig(StoragePathFeature storagePath) { if (!Directory.Exists(storagePath.StorageRootPath)) { Directory.CreateDirectory(storagePath.StorageRootPath); } var config = new SeqForwarderConfig { Output = { ServerUrl = "http://localhost:5341", ApiKey = null, EventBodyLimitBytes = 256 * 1024, RawPayloadLimitBytes = 10 * 1024 * 1024 }, Diagnostics = { InternalLoggingLevel = LogEventLevel.Information, InternalLogPath = GetDefaultInternalLogPath() }, Storage = { BufferSizeBytes = 64 * 1024 * 1024 } }; SeqForwarderConfig.Write(storagePath.ConfigFilePath, config); return(config); }
public ConfigCommand() { _storagePath = Enable <StoragePathFeature>(); Options.Add("k|key=", "The field, for example \"output.serverUrl\"", k => _key = k); Options.Add("v|value=", "The field value; if not specified, the command will print the current value", v => _value = v); Options.Add("c|clear", "Clear the field", _ => _clear = true); }
public InstallCommand() { _storagePath = Enable <StoragePathFeature>(); _serviceCredentials = Enable <ServiceCredentialsFeature>(); Options.Add( "setup", "Install the service or reconfigure the binary location, then start the service", v => _setup = true); }
public ImportCommand() { _storagePath = Enable <StoragePathFeature>(); _serverInformation = Enable <ServerInformationFeature>(); _keyValueProperties = Enable <KeyValuePropertiesFeature>(); Options.Add( "f=|file=", "The file to import", v => _file = v.Trim()); }
public static SeqForwarderConfig CreateDefaultConfig(StoragePathFeature storagePath) { if (!Directory.Exists(storagePath.StorageRootPath)) { Directory.CreateDirectory(storagePath.StorageRootPath); } var config = new SeqForwarderConfig(); SeqForwarderConfig.Write(storagePath.ConfigFilePath, config); return(config); }
public TruncateCommand() { _storagePath = Enable <StoragePathFeature>(); }
public DumpCommand() { _storagePath = Enable <StoragePathFeature>(); }
public RunCommand() { Options.Add("nologo", v => _nologo = true); _storagePath = Enable <StoragePathFeature>(); _listenUri = Enable <ListenUriFeature>(); }