title: Serilog does not create log files
body: <p>Serilog does not create the logfiles - and because of that (I think) nothing is going to be logged.
  Due to the target is should be an microservice, I'm using the CQRS pattern.</p>
  
  <p>Here is my Startup.cs </p>
  
  <pre><code>private readonly ISession session;
  private readonly ILogger logger;
  
  public Startup(IConfiguration configuration)
  {
    Configuration = configuration;
  
      var baseDirectory = Directory.GetDirectoryRoot(AppDomain.CurrentDomain.BaseDirectory);
  
      Log.Logger = new LoggerConfiguration()
                      .WriteTo
                      .Logger(lc =&gt; lc.Filter
                                      .ByIncludingOnly(e =&gt; e.Level == LogEventLevel.Information || e.Level == LogEventLevel.Debug)
                                      .WriteTo.RollingFile(Path.Combine(baseDirectory, "/Logs/info.log")))
                      .WriteTo
                      .Logger(lc =&gt; lc.Filter
                                      .ByIncludingOnly(e =&gt; e.Level == LogEventLevel.Error)
                                      .WriteTo.RollingFile(Path.Combine(baseDirectory, "/Logs/error.log")))
  
  }
  public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
  {
    if (env.IsDevelopment())
    {
      app.UseDeveloperExceptionPage();
    }
  
     loggerFactory.AddSerilog();
     ...//To shorten this example in Stackoverflow, I've excluded the standard code. But in reality they are of course there
  }
  </code></pre>
  
  <p>Here is my Class, in which the logger will be injected by the DI:</p>
  
  <pre><code>public MaterialCommandHandler(ISession session, ILogger&lt;MaterialCommandHandler&gt; logger)
  {
    this.session = session;
    this.logger = logger;
  }
  </code></pre>
  
  <p>and the Handle method, which is located in the MaterialCommandHandler class, in which I want to write something into the log file</p>
  
  <pre><code>public async Task Handle(CreateMaterialCommand command)
  {
    var material = new Material(command.Id, command.TechDesc, command.Description, command.MaterialClass);
    logger.LogDebug($"{DateTimeOffset.UtcNow} - {nameof(CreateMaterialCommand)} - received for {material} with {nameof(command.TechDesc)} : {command.TechDesc}.");
    await session.Add(material);
    await session.Commit();
    logger.LogDebug($"{DateTimeOffset.UtcNow} - {nameof(CreateMaterialCommand)} - received for {material} with {nameof(command.TechDesc)} : {command.TechDesc}.");
  }
  </code></pre>
  
  <p>Anyone an idea, why the files were not be created - and nothing will be logged? </p>