Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-133337 / 25.04 / Silence CryptographyDeprecationWarning #15294

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/middlewared/middlewared/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import warnings
from .logging.console_formatter import ConsoleLogFormatter
from collections import deque
from cryptography.utils import CryptographyDeprecationWarning
from json import dumps
from dataclasses import dataclass
from .utils.time_utils import utc_now
Expand Down Expand Up @@ -53,6 +54,9 @@
# Excluding this default from the generated JSON schema is the correct behavior, so there is no real issue here.
warnings.filterwarnings("ignore", module="pydantic.json_schema")

# asyncssh imports various weak crypto algorithms generating log spam on every middleware start
warnings.filterwarnings("ignore", category=CryptographyDeprecationWarning)

logging.TRACE = 6

APP_LIFECYCLE_LOGFILE = '/var/log/app_lifecycle.log'
Expand Down
Loading