mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-08 11:24:25 +00:00
Add some Eliot events related to fs notifications
This commit is contained in:
parent
a9ec9c00bd
commit
0e3c4d40b8
@ -18,6 +18,9 @@ __all__ = [
|
||||
"opt_help_eliot_destinations",
|
||||
"validateInstanceOf",
|
||||
"validateSetMembership",
|
||||
"MAYBE_NOTIFY",
|
||||
"CALLBACK",
|
||||
"INOTIFY_EVENTS",
|
||||
"RELPATH",
|
||||
"VERSION",
|
||||
"LAST_UPLOADED_URI",
|
||||
@ -54,6 +57,7 @@ from eliot import (
|
||||
ILogger,
|
||||
Message,
|
||||
Field,
|
||||
ActionType,
|
||||
FileDestination,
|
||||
add_destinations,
|
||||
remove_destination,
|
||||
@ -270,6 +274,27 @@ PATHINFO = Field(
|
||||
validateInstanceOf((type(None), PathInfo)),
|
||||
)
|
||||
|
||||
INOTIFY_EVENTS = Field(
|
||||
u"inotify_events",
|
||||
humanReadableMask,
|
||||
u"Details about a filesystem event generating a notification event.",
|
||||
validateInstanceOf((int, long)),
|
||||
)
|
||||
|
||||
MAYBE_NOTIFY = ActionType(
|
||||
u"filesystem:notification:maybe-notify",
|
||||
[],
|
||||
[],
|
||||
u"A filesystem event is being considered for dispatch to an application handler.",
|
||||
)
|
||||
|
||||
CALLBACK = ActionType(
|
||||
u"filesystem:notification:callback",
|
||||
[INOTIFY_EVENTS],
|
||||
[],
|
||||
u"A filesystem event is being dispatched to an application callback."
|
||||
)
|
||||
|
||||
def eliot_logging_service(reactor, destinations):
|
||||
"""
|
||||
Parse the given Eliot destination descriptions and return an ``IService``
|
||||
|
Loading…
x
Reference in New Issue
Block a user