logging update

This commit is contained in:
Pierce 2023-09-12 18:58:10 -04:00
parent 855cfc13c0
commit fdbdfa96db
No known key found for this signature in database
GPG Key ID: EC79465B0E865E47

View File

@ -65,12 +65,17 @@ function CFCHTTP.LogRequest( input )
local msg = { COLORS.YELLOW, tostring( #input.urls ), " urls filtered:\n", COLORS.YELLOW, " ", input.fileLocation, "\n" }
for _, v in pairs( input.urls or {} ) do
local url = v.url
local reason = v.reason or ""
local reason = v.reason
local requestStatus = string.upper( v.status ) or "UNKNOWN"
local requestColor = statusColors[requestStatus] or COLORS.GREY
if reason then
reason = ": " .. reason
else
reason = ""
end
table.Add( msg,
{ requestColor, "\t", requestStatus, COLORS.GREY, ": ", COLORS.YELLOW, string.upper( input.method ), COLORS.GREY, " - ", COLORS.YELLOW, url, " : ", COLORS.WHITE, reason, "\n" } )
{ requestColor, "\t", requestStatus, COLORS.GREY, ": ", COLORS.YELLOW, string.upper( input.method ), COLORS.GREY, " - ", COLORS.YELLOW, url, COLORS.WHITE, reason, "\n" } )
end
MsgC( unpack( msg ) )