en-US/about_uLog.help.txt

TOPIC
    about_uLog
 
SHORT DESCRIPTION
    This module easily manage logging for PowerShell scripts
 
LONG DESCRIPTION
    This module try to facility and encourage logging in scripts
    As so, it works without initilizing any log manager.
 
    Regarding the $MyInvocation.ScriptName value, the log is written on the
    console if the value contains a path to a .ps1 file, and it is written
    to the eventlog if the value contains a path to a .psm1.
 
    for example, directly using Log-Info -Message 'Hello'
    will write "Hello" on the console if used from a script,
    and write "Hello" in the eventlog.
 
    Default logging for eventlog
      
        If the script is run with administrtive privilege, the event is created in
        the "Application" eventlog. A source named after the script/module's name
        is created.
        If the script is not run with administrtive privilege, the user cannot
        create a source, so the "Windows PowerShell" source is used. If a Id is
        used, 1000 will be added, so it does not conflict with "Windows PowerShell"
        Ids.
 
    Default logging for file
      
        If the script is run with administrtive privilege, the log is located in
        %SystemRoot%\Logs.
        If the script is not run with administrtive privilege, the module try to
        create the log in the script folder, otherwise it creates the log in the
        %temp% folder.
 
    If the log manager is initilized, for example $log = New-uLog, then handlers
    can be added. The following command
    $log.AddLogProvider( (New-uLogEventLog) )
    adds an eventlog handler to the manager, $log.AddLogProvider( (New-uLogFile) )
    adds a file to the log manager.
    When using a command, Log-<level>, the message is send to all handlers.
 
 
EXAMPLES
     
 
KEYWORDS
    ulog log logging