Skip to content

Intermittent issue with Logging module #63

Description

@dmcconnell68

Hi,

I'm trying to implement your logging module, but seeing some intermittent strange behavior. An example, I run a script and get the following error:

Replace-Token : The term 'Replace-Token' is not recognized as the name of a cmdlet, function, script file, or operable 
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Program Files\WindowsPowerShell\Modules\Logging\4.1.1\targets\File.ps1:24 char:17
         $Text = Replace-Token -String $Configuration.Format -Source $ ...
                 ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Replace-Token:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I can immediately run the same script again and it works without error.

Any ideas on what may be causing this?

Name                           Value
----                           -----
PSVersion                      5.1.14409.1018
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1018
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Thanks,
David

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions