added discord errorlogging

main
Yuriy 6 months ago
parent dacd8f353a
commit 2dd27065be

@ -70,6 +70,7 @@ global DiscordErrorLoggingWebhookBotURL
global DiscordVideosWebhookURL
global VideoFolderDir
global LogErrorsToMsgbox
global ErrorLogToDiscord
; global LogErrorsToTextFile
global CurrentSite
global Driver
@ -157,6 +158,15 @@ LivestreamThumbnail := ThumbnailJPEGFilepath
; ------------------------------------------------
IniRead, ConfirmBeforeSubmit, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit, 1
IniRead, AutoUpdateCheck, %SettingsIniFilepath%, %ScriptSettingsSection%, AutoUpdateCheck, 1
IniRead, ErrorLogToDiscord, %SettingsIniFilepath%, %ScriptSettingsSection%, ErrorLogToDiscord, 1
if(ErrorLogToDiscord){
; Discord
IniRead, DiscordErrorLoggingWebhookBotURL, %SettingsIniFilepath%, General, DiscordWebhookBotURL, %A_space%
if(DiscordErrorLoggingWebhookBotURL = ""){
Message = DiscordErrorLoggingWebhookBotURL is blank. `nWill not be able to post error messages or upload status to discord.`nPlease add discord webhook URL in settings.ini under: `n`n[General]`DiscordErrorLoggingWebhookBotURL=
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile,ErrorSummaryVar")
}
}
@ -254,9 +264,13 @@ Gui, Font, Bold
Gui, Add, Text,y0 x%ColumnTwoXPosition%, Settings
Gui, Font, Normal
Gui, Font, s8
Gui, Add, Checkbox, vErrorLogToDiscord Checked%ErrorLogToDiscord%, Error Log to Discord
Gui, Add, Checkbox, vConfirmBeforeSubmit checked%ConfirmBeforeSubmit%, Confirm Before Submit
Gui, Add, Checkbox, vAutoUpdateCheck Checked%AutoUpdateCheck%, Auto Update Check
if(UpdateAvailable){
Gui, Add, Button, cRed w%ColumnTwoEditBoxWidth% gUpdateScript vUpdateAvailable center, Update Available!
}
@ -399,6 +413,7 @@ Gui, submit, NoHide
; ------------------------------------------------
IniWrite, %ConfirmBeforeSubmit%, %SettingsIniFilepath%, %ScriptSettingsSection%, ConfirmBeforeSubmit
IniWrite, %AutoUpdateCheck%, %SettingsIniFilepath%, %ScriptSettingsSection%, AutoUpdateCheck
IniWrite, %ErrorLogToDiscord%, %SettingsIniFilepath%, %ScriptSettingsSection%, ErrorLogToDiscord
; Re-use an existing errorlog or create new directory

Binary file not shown.
Loading…
Cancel
Save