Skip to content

Commit 8ed0713

Browse files
committed
fix: add deprecation warning to get_recent_logs method
The get_recent_logs method is deprecated in favor of journalctl. Added a warning log when this method is called to help identify code still using the deprecated method. Addresses Copilot suggestion. Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
1 parent e2d9cc4 commit 8ed0713

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

server/audit.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,8 @@ def get_recent_logs(self, limit: int = 100) -> list:
7171
# This function is now deprecated in favor of journalctl
7272
# We return empty here to avoid breaking callers instantly,
7373
# but the admin tool will be updated to fetch from journal.
74+
self.logger.warning(
75+
"AuditLogger.get_recent_logs is deprecated and returns an empty list; "
76+
"use journalctl to access audit logs instead."
77+
)
7478
return []

0 commit comments

Comments
 (0)