|
@@ -357,7 +357,7 @@ func (g *Gateway) ExecuteAGIScript(scriptContent string, fsh *filesystem.FileSys
|
|
|
if thisuser != nil {
|
|
if thisuser != nil {
|
|
|
username = thisuser.Username
|
|
username = thisuser.Username
|
|
|
}
|
|
}
|
|
|
- logger.PrintAndLog("Agi", fmt.Sprintf("[AGI] Script error in %s (user: %s): %s", scriptFile, username, err.Error()), nil)
|
|
|
|
|
|
|
+ logger.PrintAndLog("Agi", fmt.Sprintf("[AGI][%s] Script error in %s (user: %s): %s", execID, scriptFile, username, err.Error()), nil)
|
|
|
|
|
|
|
|
if devMode {
|
|
if devMode {
|
|
|
// Return a detailed JSON error payload for developer inspection
|
|
// Return a detailed JSON error payload for developer inspection
|
|
@@ -496,7 +496,7 @@ func (g *Gateway) ExecuteAGIScriptAsUser(fsh *filesystem.FileSystemHandler, scri
|
|
|
|
|
|
|
|
_, err = vm.Run(scriptContent)
|
|
_, err = vm.Run(scriptContent)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
- logger.PrintAndLog("Agi", fmt.Sprintf("[AGI] Script error in %s (user: %s): %s", scriptFile, targetUser.Username, err.Error()), nil)
|
|
|
|
|
|
|
+ logger.PrintAndLog("Agi", fmt.Sprintf("[AGI][%s] Script error in %s (user: %s): %s", execID, scriptFile, targetUser.Username, err.Error()), nil)
|
|
|
return execID, "", err
|
|
return execID, "", err
|
|
|
}
|
|
}
|
|
|
|
|
|