fastapi-gae-logging 0.0.4__tar.gz → 0.0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastapi-gae-logging
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine. Groups logs coming from the same request lifecycle and propagates the maximum log level throughout the request lifecycle using middleware and context management.
5
5
  Home-page: https://github.com/chrisK824/fastapi-gae-logging
6
6
  Author: Chris Karvouniaris
@@ -74,6 +74,8 @@ if os.getenv('GAE_ENV', '').startswith('standard'):
74
74
 
75
75
  client = google.cloud.logging.Client()
76
76
  gae_log_handler = FastAPIGAELoggingHandler(app=app, client=client)
77
+ # use the log_payload parameter if you want to opt-out from payload logging
78
+ # gae_log_handler = FastAPIGAELoggingHandler(app=app, client=client, log_payload=False)
77
79
  setup_logging(handler=gae_log_handler)
78
80
 
79
81
  logging.getLogger().setLevel(logging.DEBUG)
@@ -58,6 +58,8 @@ if os.getenv('GAE_ENV', '').startswith('standard'):
58
58
 
59
59
  client = google.cloud.logging.Client()
60
60
  gae_log_handler = FastAPIGAELoggingHandler(app=app, client=client)
61
+ # use the log_payload parameter if you want to opt-out from payload logging
62
+ # gae_log_handler = FastAPIGAELoggingHandler(app=app, client=client, log_payload=False)
61
63
  setup_logging(handler=gae_log_handler)
62
64
 
63
65
  logging.getLogger().setLevel(logging.DEBUG)
@@ -216,6 +216,9 @@ class FastAPIGAELoggingHandler(CloudLoggingHandler):
216
216
  app (FastAPI): The FastAPI application instance.
217
217
  request_logger_name (Optional[str]): The name of the Cloud Logging logger to use for request logs.
218
218
  Defaults to the Google Cloud Project ID with '-request-logger' suffix.
219
+ log_payload (bool): Whether to log the request payload. If True, the payload for
220
+ POST, PUT, PATCH, and DELETE requests will be logged.
221
+ Defaults to True.
219
222
  *args: Additional arguments to pass to the superclass constructor.
220
223
  Any argument you would pass to CloudLoggingHandler.
221
224
  **kwargs: Additional keyword arguments to pass to the superclass constructor.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastapi-gae-logging
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine. Groups logs coming from the same request lifecycle and propagates the maximum log level throughout the request lifecycle using middleware and context management.
5
5
  Home-page: https://github.com/chrisK824/fastapi-gae-logging
6
6
  Author: Chris Karvouniaris
@@ -74,6 +74,8 @@ if os.getenv('GAE_ENV', '').startswith('standard'):
74
74
 
75
75
  client = google.cloud.logging.Client()
76
76
  gae_log_handler = FastAPIGAELoggingHandler(app=app, client=client)
77
+ # use the log_payload parameter if you want to opt-out from payload logging
78
+ # gae_log_handler = FastAPIGAELoggingHandler(app=app, client=client, log_payload=False)
77
79
  setup_logging(handler=gae_log_handler)
78
80
 
79
81
  logging.getLogger().setLevel(logging.DEBUG)
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="fastapi-gae-logging",
5
- version="0.0.4",
5
+ version="0.0.5",
6
6
  description="Custom Cloud Logging handler for FastAPI applications deployed in Google App Engine. \
7
7
  Groups logs coming from the same request lifecycle and propagates the maximum log level \
8
8
  throughout the request lifecycle using middleware and context management.",