-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
PSFLoggingProvider template produced with Invoke-PSMDTemplate is a version_1 template #485
Comments
Heya @ayprof , thanks for bringing that up and sorry for the inconvenience! That said, if you need help converting the logging provider and can share the code, I'll be happy to help and advise in the meantime. |
No problem, thanks for the excellent work! To start, maybe I should ask first whether my issue would be resolved by moving to a version2 provider. I have a script that is called via another script that runs it as a job. Both the script called and the script calling it log the results in separate logfiles. The first script updates a security group and then logs the changes in a logfile with the name of the security group and puts it in a folder also named after the security group. The script that creates the jobs per security group is called from a scheduled task. The configuration I'm using is below and is called at the beginning of the script:
This works sometimes, but the rest of the time the groupLogName is truncated from the path, leaving logfiles that only include the date. I'm not sure why this works at first and then stops working a few days later. I was really only shooting in the dark to see if moving to version2 would fix this issue but I really don't know. Any thoughts? |
This is fundamentally independent of the provider versions. I could see this having issues when you mess around with scopes or dotsourcing, but generally those should still always behave the same, no matter how often you run them ... Any chance you can share the full code you are using? |
This is the code that gets ran as a scheduled task. It calls the Update-DynamicGroup function that contains the PSFramework configuration code that I already included in the previous post.
|
Hm, is there a reason you are using jobs when you are waiting for them to complete anyway before moving on? |
Not sure if this is intended or not but I tried to create a custom logfile provider from the template (no problems there), but the provider produced is a version_1 provider, not version_2. I'm running into some issues converting it into a version_2 provider manually, and wondered if this isn't something that should be fixed.
To reproduce:
Invoke-PSMDTemplate PSFLoggingProvider -Name 'customProvider' -Module 'customModule'
The text was updated successfully, but these errors were encountered: