Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Support read formatStackTraceAsArray from configuration #459

Closed
wants to merge 1 commit into from

Conversation

AiSY-Yang
Copy link

@AiSY-Yang AiSY-Yang commented Aug 16, 2022

Support read formatStackTraceAsArray from configuration

What issue does this PR address?
When I Add formatStackTraceAsArray in my configuration file ,this paramater does not take effect.
Like this

    "WriteTo": [
      {
        "Name": "Elasticsearch",
        "Args": {
          "nodeUris": "http://localhost:9200/",
          "typeName": null,
          "formatStackTraceAsArray": true
        }
      }
    ]

So I add paramater to LoggerConfiguration method

Does this PR introduce a breaking change?
No breaking
I add paramater to the end

Please check if the PR fulfills these requirements

  • The commit follows our guidelines
  • Unit Tests for the changes have been added (for bug fixes / features)

Other information:

Support read formatStackTraceAsArray  from Configuration
@AiSY-Yang AiSY-Yang changed the title Support read formatStackTraceAsArray from Configuration Support read formatStackTraceAsArray from configuration Aug 16, 2022
@mivano
Copy link
Contributor

mivano commented Aug 17, 2022

Thanks, although added to the back and being optional, does however still makes it breaking. It is not a binary-compatible change as the call site changes. I m a bit hesitant to accept as the method signature is already long, too long IMHO. Is there a way for you to work around it?

@AiSY-Yang
Copy link
Author

It looks like you have a problem with test script
The test is pass but have error in test report stage

The Serilog only support inject paramater in method parameters,can't modify property after constructor.
so when you want to set all properties in a configuration file , must hav a method include all properties of ElasticsearchSinkOptions . It can be an extension method or a constructor ,Add a constructor of ElasticsearchSinkOptions is same as this PR.

I just want to set everything in the configuration file,If that's hard I can continue to set parameters through the program

@mivano mivano closed this Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants