1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-06 20:10:56 +00:00

Improve log messages

Log failed login attempts with remote host as warning (closes #1104)
Add component UID to log message about invalid recurrence rules (reference #602)
Use "forwarded for" instead of "forwarded by" for remote host
This commit is contained in:
Unrud 2020-09-26 22:08:23 +02:00
parent 9cc88eb4f6
commit c89cd67065
9 changed files with 16 additions and 15 deletions

View file

@ -134,8 +134,8 @@ def check_and_sanitize_items(vobject_items, is_collection=False, tag=None):
try:
component.rruleset
except Exception as e:
raise ValueError("invalid recurrence rules in %s" %
component.name) from e
raise ValueError("Invalid recurrence rules in %s in object %r"
% (component.name, component_uid)) from e
elif tag == "VADDRESSBOOK":
# https://tools.ietf.org/html/rfc6352#section-5.1
object_uids = set()
@ -311,10 +311,10 @@ class Item:
"""
if text is None and vobject_item is None:
raise ValueError(
"at least one of 'text' or 'vobject_item' must be set")
"At least one of 'text' or 'vobject_item' must be set")
if collection_path is None:
if collection is None:
raise ValueError("at least one of 'collection_path' or "
raise ValueError("At least one of 'collection_path' or "
"'collection' must be set")
collection_path = collection.path
assert collection_path == pathutils.strip_path(