Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public HomeController(ILogger<HomeController> logger)
  2. {
  3. _logger = logger;
  4. }
  5.  
  6. public IActionResult Index()
  7. {
  8. _logger.LogInformation("=========================================");
  9. _logger.LogError("=========================================");
  10. return View();
  11. }
  12.  
  13. {
  14. "Logging": {
  15. "LogLevel": {
  16. "Default": "Debug",
  17. "System": "Error",
  18. "Microsoft": "Error"
  19. }
  20. }
  21. }
  22.  
  23. public class Program
  24. {
  25. public static void Main(string[] args)
  26. {
  27. CreateWebHostBuilder(args).Build().Run();
  28. }
  29.  
  30. public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
  31. WebHost.CreateDefaultBuilder(args)
  32. .UseStartup<Startup>();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement