Skip to main content

Logging

This page contains logging compatibility helpers used by Nebula.Automations. For full and always-up-to-date details, use Get-Help <FunctionName> -Detailed (or -Examples).

Log-Message

Alias of Write-Log with the same parameters and behavior.

Parameters

Uses the same parameters as Write-Log.

Write-Log

Compatibility wrapper exposed by Nebula.Automations when Nebula.Log is unavailable.

Syntax

Write-Log [-Message <String>] [-Level <INFO|SUCCESS|WARNING|DEBUG|ERROR>] [-LogLocation <String>] [-WriteToFile]

Parameters

ParameterTypeDescriptionRequiredDefault
MessageStringLog message text to write.NoNone
LevelStringSeverity level (INFO, SUCCESS, WARNING, DEBUG, ERROR).NoINFO
LogLocationStringLog file path or destination location.NoNone
WriteToFileSwitchForces file output when supported by the active logger.NoFalse

Example

Write-Log -Message "Nightly sync completed" -Level INFO -LogLocation "C:\Logs\sync.log"

Notes

  • If Nebula.Log exists, its native Write-Log is used.
  • Otherwise, Nebula.Automations exposes a compatible Write-Log/Log-Message flow.