mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Replace logging.warn with logging.warning
This commit is contained in:
parent
576191cd4e
commit
66c6f8130d
@ -54,7 +54,7 @@ def get_remote_addr(request: Request):
|
|||||||
try:
|
try:
|
||||||
network = ipaddress.ip_network(proxy)
|
network = ipaddress.ip_network(proxy)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
logger.warn(f"Unable to parse trusted network: {proxy}")
|
logger.warning(f"Unable to parse trusted network: {proxy}")
|
||||||
trusted_proxies.append(network)
|
trusted_proxies.append(network)
|
||||||
|
|
||||||
# return the first remote address that is not trusted
|
# return the first remote address that is not trusted
|
||||||
@ -122,7 +122,7 @@ def get_jwt_secret() -> str:
|
|||||||
with open(jwt_secret_file, "w") as f:
|
with open(jwt_secret_file, "w") as f:
|
||||||
f.write(str(jwt_secret))
|
f.write(str(jwt_secret))
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"Unable to write jwt token file to config directory. A new jwt token will be created at each startup."
|
"Unable to write jwt token file to config directory. A new jwt token will be created at each startup."
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@ -131,13 +131,13 @@ def get_jwt_secret() -> str:
|
|||||||
try:
|
try:
|
||||||
jwt_secret = f.readline()
|
jwt_secret = f.readline()
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
"Unable to read jwt token from .jwt_secret file in config directory. A new jwt token will be created at each startup."
|
"Unable to read jwt token from .jwt_secret file in config directory. A new jwt token will be created at each startup."
|
||||||
)
|
)
|
||||||
jwt_secret = secrets.token_hex(64)
|
jwt_secret = secrets.token_hex(64)
|
||||||
|
|
||||||
if len(jwt_secret) < 64:
|
if len(jwt_secret) < 64:
|
||||||
logger.warn("JWT Secret is recommended to be 64 characters or more")
|
logger.warning("JWT Secret is recommended to be 64 characters or more")
|
||||||
|
|
||||||
return jwt_secret
|
return jwt_secret
|
||||||
|
|
||||||
|
|||||||
@ -1619,7 +1619,7 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
self.ffmpeg, input.path
|
self.ffmpeg, input.path
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warn(
|
logger.warning(
|
||||||
f"Error detecting stream parameters automatically for {input.path} Applying default values."
|
f"Error detecting stream parameters automatically for {input.path} Applying default values."
|
||||||
)
|
)
|
||||||
stream_info = {"width": 0, "height": 0, "fourcc": None}
|
stream_info = {"width": 0, "height": 0, "fourcc": None}
|
||||||
|
|||||||
@ -199,7 +199,7 @@ class TensorRtDetector(DetectionApi):
|
|||||||
|
|
||||||
# Run inference.
|
# Run inference.
|
||||||
if not self._execute():
|
if not self._execute():
|
||||||
logger.warn("Execute returned false")
|
logger.warning("Execute returned false")
|
||||||
|
|
||||||
# Transfer predictions back from the GPU.
|
# Transfer predictions back from the GPU.
|
||||||
[
|
[
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user