Linux jobworks 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:53:05 UTC 2026 x86_64
Apache/2.4.58 (Ubuntu)
Server IP : 10.0.1.5 & Your IP : 216.73.217.52
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
twisted /
logger /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-06-04 06:40
test
[ DIR ]
drwxr-xr-x
2026-06-04 06:40
__init__.py
3.29
KB
-rw-r--r--
2026-05-22 14:58
_buffer.py
1.49
KB
-rw-r--r--
2026-05-22 14:58
_capture.py
624
B
-rw-r--r--
2026-05-22 14:58
_file.py
2.28
KB
-rw-r--r--
2026-05-22 14:58
_filter.py
6.71
KB
-rw-r--r--
2026-05-22 14:58
_flatten.py
4.88
KB
-rw-r--r--
2026-05-22 14:58
_format.py
13.16
KB
-rw-r--r--
2026-05-22 14:58
_global.py
8.43
KB
-rw-r--r--
2026-05-22 14:58
_interfaces.py
2.29
KB
-rw-r--r--
2026-05-22 14:58
_io.py
4.44
KB
-rw-r--r--
2026-05-22 14:58
_json.py
8.21
KB
-rw-r--r--
2026-05-22 14:58
_legacy.py
5.12
KB
-rw-r--r--
2026-05-22 14:58
_levels.py
2.89
KB
-rw-r--r--
2026-05-22 14:58
_logger.py
9.75
KB
-rw-r--r--
2026-05-22 14:58
_observer.py
3.17
KB
-rw-r--r--
2026-05-22 14:58
_stdlib.py
4.42
KB
-rw-r--r--
2026-05-22 14:58
_util.py
1.34
KB
-rw-r--r--
2026-05-22 14:58
Save
Rename
# -*- test-case-name: twisted.logger.test.test_buffer -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Log observer that maintains a buffer. """ from collections import deque from typing import Deque, Optional from zope.interface import implementer from ._interfaces import ILogObserver, LogEvent _DEFAULT_BUFFER_MAXIMUM = 64 * 1024 @implementer(ILogObserver) class LimitedHistoryLogObserver: """ L{ILogObserver} that stores events in a buffer of a fixed size:: >>> from twisted.logger import LimitedHistoryLogObserver >>> history = LimitedHistoryLogObserver(5) >>> for n in range(10): history({'n': n}) ... >>> repeats = [] >>> history.replayTo(repeats.append) >>> len(repeats) 5 >>> repeats [{'n': 5}, {'n': 6}, {'n': 7}, {'n': 8}, {'n': 9}] >>> """ def __init__(self, size: Optional[int] = _DEFAULT_BUFFER_MAXIMUM) -> None: """ @param size: The maximum number of events to buffer. If L{None}, the buffer is unbounded. """ self._buffer: Deque[LogEvent] = deque(maxlen=size) def __call__(self, event: LogEvent) -> None: self._buffer.append(event) def replayTo(self, otherObserver: ILogObserver) -> None: """ Re-play the buffered events to another log observer. @param otherObserver: An observer to replay events to. """ for event in self._buffer: otherObserver(event)