How to output from function to log file

I am trying to write some larger scripts that log every step along the way.  What I am planning on doing is just tagging this function onto the end of a previous function.  So, for example, if I have a function called Create-Directory that has some Write-Host commands, I want to capture these lines to an output file.  Right now I am trying to create this section function like this, but, it is not working:

 

function Log-Process

{

    param(

        [parameter(Mandatory=$true)]

        [string]

        $logPath

    )

 

    $_ | Out-File -FilePath $filePath -Encoding ASCII -Append

}

I was trying to do this by using logic like:

Create-Folder -folderPath C: -folderName test | Out-Process

Can someone suggest a better approach?  I can write the whole thing out each time

Create-Folder -folderPath C: -folderName test | Write-File -Path C:\test\log.txt -Encoding ASCII -Append

But, being able to shorten it up, perhaps even to an an alias (like lp) would be great.  Please feel free to make suggestions.