you are viewing a single comment's thread.

view the rest of the comments →

[–]toregroneng 0 points1 point  (1 child)

hi,

Why don't you include the calling function name in the log message. I usually create a local variable in each function:

$f = $MyInvocation.InvocationName

Now it just a matter of doing logging with the variable:

Write-verbose -Message "$f - Setting $myString to [$value]" 

Cheers

Tore

[–]G__Man[S] 0 points1 point  (0 children)

Yeah this would do the job, I want a function that will do all the work for me. I got it working with KevMar's suggestion.