check error message and add initialization log for Akto Logger

This commit is contained in:
rzeta-10 2026-03-23 13:48:17 +05:30
parent 70ac6ccf89
commit 989bd9aa95
2 changed files with 3 additions and 2 deletions

View file

@ -197,8 +197,8 @@ class AktoLogger(CustomLogger):
"status": "unhealthy",
"error_message": f"Akto returned status {response.status_code}",
}
except Exception as e:
return {"status": "unhealthy", "error_message": str(e)}
except Exception:
return {"status": "unhealthy", "error_message": "Akto health check failed"}
# ── Logging callbacks ──

View file

@ -3711,6 +3711,7 @@ def set_callbacks(callback_list, function_id=None): # noqa: PLR0915
print_verbose("Initialized Greenscale Logger")
elif callback == "akto":
aktoLogger = AktoLogger()
print_verbose("Initialized Akto Logger")
elif callable(callback):
customLogger = CustomLogger()
except Exception as e: