CMLogger.psm1

#Get public and private function definition files.
    $Scripts  = @( Get-ChildItem -Path $PSScriptRoot\*.ps1 -ErrorAction SilentlyContinue )

#Dot source the files
    Foreach($import in $Scripts)
    {
        Try
        {
            . $import.fullname
        }
        Catch
        {
            Write-Error -Message "Failed to import function $($import.fullname): $_"
        }
}

#Export public functions
Export-ModuleMember -Function $Scripts.Basename