From 916e77dbe283939ddee39b2034273806e7f3d7ef Mon Sep 17 00:00:00 2001 From: Olai Date: Sun, 26 May 2024 17:44:21 +0200 Subject: [PATCH] Change the log file name Changed the log file name from log.txt to chrome_downloader.log --- .gitignore | 4 +++- Chrome Downloader.ps1 | 2 +- Log.txt | 5 +++++ Rename.ps1 | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 Log.txt diff --git a/.gitignore b/.gitignore index 701f1b8..51dfb3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /Template -Log.txt +chrome_downloader.log +/Chrome - *_force_update +/Chrome - * diff --git a/Chrome Downloader.ps1 b/Chrome Downloader.ps1 index ea0f92f..f834628 100644 --- a/Chrome Downloader.ps1 +++ b/Chrome Downloader.ps1 @@ -14,7 +14,7 @@ function Log-Message { [string]$message ) $timestamp = Get-Date -Format $dateFormat - Write-Output "[$timestamp] - $message" | Out-File -Append -FilePath "$PSScriptRoot\Log.txt" -Encoding utf8 + Write-Output "[$timestamp] - $message" | Out-File -Append -FilePath "$PSScriptRoot\chrome_downloader.log" -Encoding utf8 } # Log the start of the script diff --git a/Log.txt b/Log.txt new file mode 100644 index 0000000..4c31ae0 --- /dev/null +++ b/Log.txt @@ -0,0 +1,5 @@ +[26/05/2024 17:03:05] - Script initiation: Chrome Downloader +[26/05/2024 17:03:05] - Directory creation: 'Chrome - VERSION_force_update' successfully created in C:\Users\Olai\OneDrive\Documents\GitHub\Chrome-Downloader +[26/05/2024 17:03:05] - Success: Forced Template successfully copied to C:\Users\Olai\OneDrive\Documents\GitHub\Chrome-Downloader\Chrome - VERSION_force_update +[26/05/2024 17:03:08] - Download complete: 64-bit version of Chrome successfully downloaded to force update folder at C:\Users\Olai\OneDrive\Documents\GitHub\Chrome-Downloader\Chrome - VERSION_force_update\googlechromestandaloneenterprise64.msi +[26/05/2024 17:03:09] - Success: Folder renamed to Chrome - 125.0.6422.113_force_update diff --git a/Rename.ps1 b/Rename.ps1 index b0c6129..c3c6c3d 100644 --- a/Rename.ps1 +++ b/Rename.ps1 @@ -10,7 +10,7 @@ function Log-Message { [string]$message ) $timestamp = Get-Date -Format $dateFormat - Write-Output "[$timestamp] - $message" | Out-File -Append -FilePath "$PSScriptRoot\Log.txt" -Encoding utf8 + Write-Output "[$timestamp] - $message" | Out-File -Append -FilePath "$PSScriptRoot\chrome_downloader.log" -Encoding utf8 } if ($config.options.enableRegularVersion -and -not $config.options.enableForcedVersion) {