zoukankan      html  css  js  c++  java
  • .net core ELK

    1、关闭.net core中的自动日志

    有时候系统默认的日志过于啰嗦,可以修改配置关闭。

    在Program中的IWebHostBuilder中修改配置。

      IWebHostBuilder builder = new WebHostBuilder();
                builder.ConfigureServices(s =>
                {
                    s.AddSingleton(builder);
                });
                builder.ConfigureLogging(logging =>
                {
                    logging.SetMinimumLevel(LogLevel.Warning);
                })
                    .UseKestrel()
                    .UseContentRoot(Directory.GetCurrentDirectory())
                    .UseConfiguration(hostingconfig)
                    .UseUrls(url)
                    .UseStartup<Startup>();

    代码中ConfigureLogging用于配置日志。

  • 相关阅读:
    安卓学习57
    安卓学习56
    安卓学习55
    安卓学习54
    安卓学习53
    安卓学习52
    安卓学习51
    安卓学习50
    安卓学习49
    安卓学习48
  • 原文地址:https://www.cnblogs.com/KQNLL/p/11844997.html
Copyright © 2011-2022 走看看