Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aspnet-request-cookie Value Only #294

Closed
alexangas opened this issue Jun 15, 2018 · 1 comment · Fixed by #307
Closed

aspnet-request-cookie Value Only #294

alexangas opened this issue Jun 15, 2018 · 1 comment · Fixed by #307

Comments

@alexangas
Copy link
Contributor

Type: Bug (documentation) / Feature Request

NLog version: 4.5.6

NLog.Web/NLog.Web.AspNetCore version: 4.5.4

NLog.Extensions.Logging version: N/A

Platform: ASP.NET Core 2.0

Current NLog config:

layout="${aspnet-request-cookie:CookieNames=TestCookie}"

In case of a BUG:

  • What is the current result?
    Will print
TestCookie=TheCookieValue
  • What is the expected result?
    As per documentation, value of the cookie not including its name written to the log.
TheCookieValue
  • Did you checked the Internal log? No, not an error.

  • Please post full exception details (message, stacktrace, inner exceptions): N/A

  • Are there any workarounds? No

  • Is there a version in which it did work? Don't Know

  • Can you help us by writing an unit test? Absolutely

In case of a FEATURE REQUEST:

If this is a feature that should be added, perhaps as a flag like ValueOnly...

  • Why do we need it?
    Our logs are parsed and having the key/value pair syntax causes a problem for this. We need the value only if possible.

I'm happy to add this feature if that is OK.

@304NotModified
Copy link
Member

I'm happy to add this feature if that is OK.

👍 I propose a new option to the layout renderer. Please add some unit tests if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment