Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 23 03:18

    nblumhardt on dev

    fixing repository url Merge pull request #27 from Max… (compare)

  • Aug 22 23:50

    nblumhardt on dev

    run against netcore app 2.2 simplify build simplify build and 1 more (compare)

  • Aug 21 23:11

    serilog-build on v3.0.1

    (compare)

  • Aug 21 23:09

    serilog-build on v10254

    (compare)

  • Aug 21 23:06

    nblumhardt on dev

    Dev version bump [skip ci] (compare)

  • Aug 21 23:06

    nblumhardt on master

    Dev version bump [skip ci] #149 - Fixed index out of range… Merge pull request #150 from cr… and 1 more (compare)

  • Aug 21 22:25

    nblumhardt on dev

    #149 - Fixed index out of range… Merge pull request #150 from cr… (compare)

  • Aug 21 04:40

    nblumhardt on dev

    disable Mono on travis to spee… Merge pull request #71 from Sim… (compare)

  • Aug 21 01:29

    nblumhardt on dev

    Rename file to match type name;… Merge pull request #109 from se… (compare)

  • Aug 21 01:29

    nblumhardt on dev

    remove Serilog.Extensions.Loggi… Merge pull request #118 from Si… (compare)

  • Aug 20 23:57

    nblumhardt on dev

    remove some redundant usings Merge pull request #117 from Si… (compare)

  • Aug 20 23:57

    nblumhardt on dev

    update test and sampel refs Merge pull request #116 from Si… (compare)

  • Aug 20 23:55

    nblumhardt on dev

    remove PackageId and AssemblyNa… Merge pull request #115 from Si… (compare)

  • Aug 20 23:55

    nblumhardt on dev

    move to PackageLicenseExpression Merge pull request #114 from Si… (compare)

  • Aug 20 11:03

    serilog-build on v89

    (compare)

  • Aug 20 11:02

    ThomasArdal on master

    Depend on stable version of elm… (compare)

  • Aug 20 08:54

    mivano on dev

    Fixes two problems, needing to … (compare)

  • Aug 20 06:56

    serilog-build on v88

    (compare)

  • Aug 20 06:55

    ThomasArdal on master

    3.3.0 released (compare)

  • Aug 20 03:45

    serilog-build on v3.0.0

    (compare)

Danushka Padukka
@danushkap

Hi,

Can I use a is not null check in a filter expression to exclude a log, that does not have the given property

eg. say I have a filter:

"Filter": [
    {
        "Name": "ByExcluding",
        "Args": {
            "expression": "SkipDb is not null and SkipDb"
        }
    }
]

Im trying to exclude a log by: logger.LogTrace("exclude in db {SkipDb}", true)
and include by: logger.LogTrace("include in db")

in here, the exclude statement works but not the include.

If the include is given as: logger.LogTrace("include in db {SkipDb}", false)
then it works

seems like the null check in the expression is not working.

(please tell me if im doing something wrong here)

thanks.

Thomas Ardal
@ThomasArdal
@nblumhardt The integration with ASP.NET Core looks awesome. I'm currently logging everything from Microsoft.Extensions.Logging to elmah.io and Elasticsearch and the same for Serilog. Switching to the ASP.NET Core support in Serilog seems like a perfect choice, since I won't have to configure two different loggers with the same destinations. I'll look into the README for sure. Thanks! 👍
Eduardo Moreira
@edumartins7
@ThomasArdal I've been using appLifetime.ApplicationStopped.Register(Log.CloseAndFlush); on the configure method of startup.cs to ensure that buffered stuff gets written if application terminates
Nicholas Blumhardt
@nblumhardt
@danushkap that looks like it should work at first glance; if you can construct a failing test case in https://github.com/serilog/serilog-filters-expressions that will help us get to the bottom of it - thanks! :-)
Danushka Padukka
@danushkap
@nblumhardt, how do i "construct a failing test case in .."? you mean to add an issue? or (sorry, for asking really rookie questions)
Thomas Ardal
@ThomasArdal
@edumartins7 👍
Nicholas Blumhardt
@nblumhardt
@danushkap ideally, if you fork the repository into your own GitHub account, you can clone the code locally and edit it there to add an xUnit test case, which you can then send as a pull request; should be some docs online regarding this workflow
Danushka Padukka
@danushkap
@nblumhardt, meanwhile i did tried the same code in a fresh project to realize the filter is working. with that i checked my original project (this time i waited more patiently) to realize its working there as well, seems like it was taking a few seconds extra to write the logs to the DB (at least longer than it get printed to the console).
im sorry about the hassle; but in the bright side i learnt the workflow to report an issue 🙂 thanks so much!
Nicholas Blumhardt
@nblumhardt
:-)
1krau
@1krau
What is the replacement for ReadAppSettings that used to be in Serilog.extras.appsettings?
Nicholas Blumhardt
@nblumhardt
@1krau it's still there - ReadFrom.AppSettings() - not sure what you mean, can you share some more details?
Jonny Olliff-Lee
@DevJonny
Hey folks! Just ran into an a problem with serilog-sinks-email when trying to add multiple email addresses for To. Looking through the source code I found that multiple addresses are separated with ,;. I was wondering what the reasoning behind this was? I've seen emails delimited by , and ; but never both.
Mário Moreira
@mwamoreira_twitter
Hi all, afther publish the project in the server I get in the log file: "Failed to determine the https port for redirect." any ideia?
kelly
@kellyprankin
Anyone know how you can use enrichers when adding Serilog by using:
      services.AddLogging(loggingBuilder =>
            {
                loggingBuilder.AddSeq(Configuration.GetSection("Seq"));
            });
@nblumhardt I think his confusion is that it is in an entirely different nuget package now
I've encountered that when upgrading old stuff
Nicholas Blumhardt
@nblumhardt
@DevJonny the _connectionInfo.ToEmail.Split(",;".ToCharArray() means it will split using either - you can choose which delimiter you prefer :-)
@kellyprankin ah, that makes sense :+1: -- gee that goes back a long way!
RE enrichers with AddSeq(), no, there was a deliberate design decision there not to try replicating the whole Serilog API; it's probably due to be revisited - replying via your ticket
Jonny Olliff-Lee
@DevJonny
@nblumhardt Thank for getting back to me so quickly! :-) Interesting, that's what I thought so I tried both yesterday and kept getting an exception, it only worked when I did ,;. I'll have another play around today and see where I went wrong.
毕殿卿
@bidianqing
minimumlevel not support 'None'
I think that should be supported
Danushka Padukka
@danushkap

hi!

in an ASPNET CORE project, i have setup a File-sink path in the appsettings.json as:

"path": "Logs\\App.log"

when i run the application via dotnet run the folder and the log file get created in the correct - relative location (next to the .dll)

BUT when i run the application via VisualStudio the folder get created next to .csproj (not in the bin\..)

is there a way to fix this?

thanks

Rodney S. Foley
@CreepyGnome
Looking for help getting Serilog.Settings.Configuration within an ASP.net core Web API projects using the appsettings.json Serilog section working.
Rodney S. Foley
@CreepyGnome

The details of my issues getting it to work are detailed here

serilog/serilog-settings-configuration#195

Wondering if maybe I can get a workaround by providing my own DependencyContext instead of letting it use the default one as it throws an exception even though all the dependencies are really there and can be found with a tweak to the Linq query that is being used by Serilog config package.

Rodney S. Foley
@CreepyGnome
If you want to make a PR to an official Serilog repo after I fork should I work from the Dev or Master branch?
Nicholas Blumhardt
@nblumhardt
Hi @CreepyGnome ! .. working from and targeting dev is the way to go; thanks for helping with the issue!
Nelson Wells
@nelsonwellswku
Hello all, is this chat for serilog development or usage help?
Nicholas Blumhardt
@nblumhardt
@nelsonwellswku yep! Both :+1:
Nelson Wells
@nelsonwellswku
cool, thanks for the info
I am curious about this package and how to use it - https://github.com/serilog/serilog-aspnetcore
does it only support using the static Logger?
I am running into a chicken and egg problem where I need the configuration and environment knowledge from the normal Startup.cs file in Program.cs
I am currently setting up the static logger in Startup.cs but I am not sure that's the right approach
Nelson Wells
@nelsonwellswku
Naturally, as soon as I ask the question I find this, which might solve the problem I am having https://github.com/serilog/serilog-aspnetcore/blob/dev/samples/InlineInitializationSample/Program.cs
but I am not at work any more today so will try tomorrow
Nicholas Blumhardt
@nblumhardt
@nelsonwellswku great :+1: - a non-static ILogger is also fully-supported; one just needs to be passed as an argument to UseSerilog(). HTH~!
/all, is anyone around and able to give https://github.com/serilog/serilog-extensions-hosting/pull/13/ a quick :eyes: ? :-)
Mtech Pvt Ltd
@AdimUser
Hi Team, we started to use serialog with .net core 2.2 application. seems like log output is very noisy. eg : it give two log lines for request start time and request finished time. plus controller executions details in multiple lines.... Is there anyway we can get rid of it ?
advapiIT
@advapiIT
Hello,
I've replaced my current logging framework (not mine, the one used!) with Serilog. Since now it's really important for us to have structured logging. Before we were using a Log4Net adapter so that simpleinjector's injects the correctly contexted log
  //container.RegisterConditional(typeof(ILog),
            //    c => typeof(Log4NetAdapter<>).MakeGenericType(c.Consumer?.ImplementationType ?? typeof(object)),
            //    Lifestyle.Singleton,
            //    c => true);
how do I achieve such a feature in with Serilog & SimpleInjector
Jon Anders Amundsen
@JonAnders
Hey guys, are there any plans for a stable 2.0 release of Serilog.Extensions.Logging.File? Any specific issues holding it back?
Nicholas Blumhardt
@nblumhardt
@JonAnders Hi! Nothing that I can recall is holding it back; I'd forgotten about it since I stopped _watch_ing the repository due to the noise :-) .. Having a look now! :+1:
@AdimUser how did you go with the new version of Serilog.AspNetCore?
Nicholas Blumhardt
@nblumhardt
@JonAnders I think serilog/serilog-extensions-logging-file#32 is needed if we want to call v2 "complete" - the stumbling block, though, is that ILoggingBuilder introduces other semantics.
TBH, Serilog.AspNetCore and Serilog.Sinks.File are the happy path, if you have that option it's highly recommended
Given how things have panned out, we might need to review whether we start making that recommendation in the Serilog.Extensions.Logging.File README.
Jon Anders Amundsen
@JonAnders
@nblumhardt Thanks for checking it out! I suspect that issue is about people trying to use v1.1, while reading instructions for v2.0.
We were using Serilog.Extensions.Logging.File because that looked like the simplest solution (we don't have very complex needs). If Serilog.AspNetCore and Serilog.Sinks.File is considered the happy path, then I will definitely look into that instead. Thanks for pointing me in the right direction!