private static void SetupEnvironment(IVostokHostingEnvironmentBuilder builder) { builder.SetupApplicationIdentity( id => { id.SetProject("infra"); id.SetApplication("vostok-test"); id.SetEnvironment("dev"); id.SetInstance("the only one"); }); builder.SetupLog(log => log.SetupConsoleLog()); }
private static void MultiHostApplicationBuilder(IVostokHostingEnvironmentBuilder builder) { builder.SetupApplicationIdentity( id => { id.SetProject("good project"); id.SetApplication("vostok-test"); id.SetEnvironment("dev"); id.SetInstance("the only one"); }); builder.SetupLog(log => log.SetupConsoleLog()); builder.SetupShutdownTimeout(1.Milliseconds()); }
private void SetupCommons(IVostokHostingEnvironmentBuilder builder) { builder.SetupApplicationIdentity( id => { id.SetProject("Project"); id.SetApplication("App"); id.SetEnvironment("Environment"); id.SetInstance("Instance"); }); builder.SetupShutdownToken(shutdown.Token); builder.SetupShutdownTimeout(30.Seconds() + ShutdownConstants.CutAmountForExternalTimeout); builder.SetupLog(log => log.SetupConsoleLog()); }
private static void SetupEnvironment(IVostokHostingEnvironmentBuilder builder) { builder.SetupApplicationIdentity( id => { id.SetProject("infra"); id.SetApplication("vostok-test"); id.SetEnvironment("dev"); id.SetInstance("the only one"); }); builder.SetupLog(log => log.SetupConsoleLog()); builder.SetupConfiguration( config => { config.AddSource(new ObjectSource(new {})); config.AddSecretSource(new ObjectSource(new {})); }); builder.SetupClusterConfigClient(config => config.CustomizeSettings(setting => setting.EnableClusterSettings = false)); }
/// <summary> /// Adds <see cref="LogConfigurationRule"/>s from built-in <see cref="IConfigurationSource"/> in given <paramref name="scope"/>. /// </summary> public static IVostokHostingEnvironmentBuilder AddLoggingRulesFromSettings([NotNull] this IVostokHostingEnvironmentBuilder builder, [NotNull] params string[] scope) => builder.SetupLog((log, context) => log.AddRules(context.ConfigurationSource.ScopeTo(scope)));
private static void MultiHostBuilder(IVostokHostingEnvironmentBuilder builder) { builder.SetupLog(log => log.SetupConsoleLog()); }
private static void SetupMultiHostApplication(IVostokHostingEnvironmentBuilder builder) { builder.SetupLog(log => log.SetupConsoleLog()); builder.SetupShutdownTimeout(1.Milliseconds()); }