-
Notifications
You must be signed in to change notification settings - Fork 152
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
Is it possible to do nested json configurations via complex variables or target-refs? #464
Comments
Think Support for having complete layouts in a variable is waiting for NLog 5.0 - NLog/NLog#3459, but maybe some preparation is needed in NLog.Extension.Logging. |
Created #465 to prepare for NLog 5.0 |
Is there a way to infer target attributes/properties from variables then? I mean not one-by-one but as a template. For example,
|
No that would require some other JSON transformation logic. NLog Config Variables only contains a single NLog Layout. |
One last question about this; would that be valid to refer current NLog configuration via For example:
|
It cannot be used to load an entire configuration-tree and inject at some other location. |
Type:
NLog.Extensions.Logging version: 1.6.5
I have tried multiple configurations but could not do 2 things:
1- Complex variables, for example a variable of type JsonLayout. I was only able to use simple variables such as a string.
2- Referencing other targets via
target-ref
orwrapped-target-ref
properties within wrapper targets such asAsyncWrapper
orRetryingWrapper
.Currently I am using copy-paste for long configurations. Is it possible to use complex variables or target-refs inside
appsettings.json
? Can you please direct me to an example or detailed documentation other thanLoggingConfigurationParser
code?The text was updated successfully, but these errors were encountered: