Пример #1
0
        /// <summary>
        ///     Welcome our users and boot up!
        /// </summary>
        protected static void Welcome()
        {
            string agentVersion = Version.Get();

            Console.WriteLine(Constants.Texts.Welcome);
            Log.Logger.Information($"Booting up Promitor v{agentVersion} - Thank you for using Promitor!");
        }
Пример #2
0
        /// <summary>
        ///     Welcome our users and boot up!
        /// </summary>
        protected static void Welcome()
        {
            string agentVersion = Version.Get();

            Console.WriteLine(Constants.Texts.Welcome);
            Log.Logger.Information($"Booting up Promitor v{agentVersion} running .NET {RuntimeInformation.FrameworkDescription} - Thank you for using Promitor!");
            var operatingSystem = RuntimeInformation.OSDescription.Contains("linux", StringComparison.InvariantCultureIgnoreCase) ? "Linux" : "Windows";

            Log.Logger.Information($"Running {RuntimeInformation.FrameworkDescription} on {operatingSystem} ({RuntimeInformation.RuntimeIdentifier} | {RuntimeInformation.OSDescription}).");
        }
Пример #3
0
        /// <summary>
        ///     Configure logging during startup
        /// </summary>
        protected static void ConfigureStartupLogging()
        {
            string agentVersion = Version.Get();

            Log.Logger = new LoggerConfiguration()
                         .Enrich.FromLogContext()
                         .Enrich.WithProperty("Version", agentVersion)
                         .WriteTo.Console()
                         .CreateLogger();
        }