Skip to content

Commit

Permalink
Set log level
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonsturgeon committed Nov 3, 2022
1 parent 4044298 commit 456e7b8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions moon/cfc_err_forwarder/error_forwarder.moon
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ return class ErrorForwarder
if isClientside
newError = @addPlyToObject newError, ply

@logger\info "Inserting error into queue: '#{fullError}'"
@logger\debug "Inserting error into queue: '#{fullError}'"

rawset @queue, fullError, newError

Expand All @@ -139,7 +139,7 @@ return class ErrorForwarder
@queueError isRuntime, fullError, sourceFile, sourceLine, errorString, stack, ply

logErrorInfo: (isRuntime, fullError, sourceFile, sourceLine, errorString, stack) =>
debug = @logger\info
debug = @logger\debug

debug "Is Runtime: #{isRuntime}"
debug "Full Error: #{fullError}"
Expand All @@ -148,7 +148,7 @@ return class ErrorForwarder
debug "Error String: #{errorString}"

receiveSVError: (isRuntime, fullError, sourceFile, sourceLine, errorString, stack) =>
@logger\info "Received Serverside Lua Error: #{errorString}"
@logger\debug "Received Serverside Lua Error: #{errorString}"
@logErrorInfo isRuntime, fullError, sourceFile, sourceLine, errorString, stack

@receiveError isRuntime, fullError, sourceFile, sourceLine, errorString, stack
Expand All @@ -157,7 +157,7 @@ return class ErrorForwarder
return unless ply and ply\IsPlayer!
return unless @config.clientEnabled\GetBool!

@logger\info "Received Clientside Lua Error for #{ply\SteamID!} (#{ply\Name!}): #{errorString}"
@logger\debug "Received Clientside Lua Error for #{ply\SteamID!} (#{ply\Name!}): #{errorString}"
@logErrorInfo true, fullError, sourceFile, sourceLine, errorString, stack

@receiveError true, fullError, sourceFile, sourceLine, errorString, stack, ply
Expand All @@ -168,7 +168,7 @@ return class ErrorForwarder
return errorStruct

forwardError: (errorStruct, onSuccess, onFailure) =>
@logger\info "Sending error object.."
@logger\debug "Sending error object.."
data = @cleanStruct errorStruct

self.discord data, onSuccess, onFailure
Expand All @@ -191,11 +191,11 @@ return class ErrorForwarder
count = @countQueue!
return if count == 0

@logger\info "Grooming Error Queue of size: #{count}"
@logger\debug "Grooming Error Queue of size: #{count}"
@forwardErrors!

onSuccess: (fullError) =>
@logger\info "Successfully sent error", fullError
@logger\debug "Successfully sent error", fullError

@unqueueError fullError

Expand Down

0 comments on commit 456e7b8

Please sign in to comment.