# Write-UcmLog

## Description

Basic log file and user feedback function, allows for logging only, log levels logs hostname/time etc

## Parameters

#### Message (Required)

The message to write

#### Path (optional)

The location of the logfile, will default to the script variable **$Script:LogFileLocation** if not specified

#### Severity&#x20;

Sets the severity of the log message, Higher severities will call Write-Warning or Write-Error

#### Component

Used to track the module or function that called "Write-Log"

#### LogOnly&#x20;

Forces Write-Log to not display anything to the user

## Example

Write-Log -Message 'This is a log message' -Severity 3 -component 'Example Component' Writes a log file message and displays a warning to the user

```powershell
Write-Log -Message 'This is a log message' -Severity 3 -component 'Example Component' 
# Writes a log file message and displays a warning to the user
```
