-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
added unit test: string with variable get expanded #670
Conversation
Skipped as it's unclear if its a bug
I believe this is a bug, shouldn't we try to fix in this pull request too? |
If it's a bug, yes. Although I could be handy to expand also strings? For configuring passwords globally etc. |
It could have use cases but I think it is a bit counter intuitive |
Agree. But I'm always reticent (not sure if this is the correct English word) with changing things non-backwards compatible. |
I'll merged the test for now, when we figure out what to do a new pull request can be added |
added unit test: string with variable get expanded
👍 |
It seems to me that, there is a (new) bug originated in the change of the source Eventlog from the original Post: #669 I'm new to github, so - if this is not the place to say this please tell me so. What I noticed: The EventLog-Target has as Source a Layout But: trying to set it like this failed: logEvent.Properties["MySource"] = useSource;
logEvent.Properties["EventID"] = dicId.EventId; <target xsi:type="EventLog" name="ELNoFileName" machineName="."
source="${event-properties:item=MySource}" log="Application"
eventId="${event-properties:EventID}"
layout="ELNoFileName (${event-properties:item=MySource}): ${message}"/> It DOES set the EventID, it DOES set the source, but it seems to me it KEEPS the source the same for all logevents to the target after the first loggin-action. Now - as you can see - it's pretty mystic for me. How to report such a bug or how to give you guys the possibility to re-create this problem? Maybe it's also about the useSource?`Basically i fill it like this (before every call to NLog.Logger.Log): var eventLogSource = !string.IsNullOrEmpty(userMethod?.DeclaringType?.Assembly.GetName().Name)
? userMethod.DeclaringType.Assembly.GetName().Name
: "Application Error"; Edit: Maybe it's important that I inherited my custom logging-Class from NLog.Logger? |
@ArchonMegalon is this the same issue as #1542? |
Hi! Yes! I was not able to find my own post again, so I opened a new issue. Sorry for that! |
Skipped as it's unclear if its a bug