Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion gateway/gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# configure target base URL's, headers and role based access, per service name.
# Replaces security-proxy's targets-mapping.properties, headers-mapping.properties, and security-mappings.xml
#
spring.config.import: application.yaml, security.yaml, routes.yaml, roles-mappings.yaml
spring.config.import: application.yaml, security.yaml, routes.yaml, roles-mappings.yaml, logging.yaml

georchestra:
gateway:
Expand Down
72 changes: 72 additions & 0 deletions gateway/logging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Logging profiles

# default profile:
logging:
# Control behavior of the access logging. When enabled, the request logs will include the URI's that match
# the following regular expressions at the specified level.
# Additionally, if the json-logs spring profile is enabled, the log entries will include MDC attributes configured in the logging.mdc.include.* properties below
accesslog:
enabled: true
# A list of java regular expressions applied to the request URL for logging at info level
# Includes OGC service requests which are proxied to GeoServer
info:
- .*/(?:ows|ogc|wms|wfs|wcs|wps)(?:/.*|\?.*)?$
# A list of java regular expressions applied to the request URL for logging at debug level
debug:
- ".*/console/.*"
# A list of java regular expressions applied to the request URL for logging at trace level
# The default behavior is to EXCLUDE known static resources and image files
trace:
- ^(?!.*/web/wicket/resource/)(?!.*\.(png|jpg|jpeg|gif|svg|webp|ico)(\?.*)?$).*$

# Configuration to inject auth, application, and http request attributes to the logging MDC.
# The following are default values. The MDC attributes will be automatically
# included when using the json-logs profile. For the regular console output you could tweak the logback-spring.xml
# config file to include the required MDC properties
# In any case, the activated MDC will be visible when using the OpenTelemetry protocol
mdc:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weren't the access logs already enabled here: georchestra/georchestra-gateway#146?

include:
user:
id: true
roles: false
org: true
extras: false
auth-method: false
application:
name: true
version: true
instance-id: true
active-profiles: false
http:
id: true
method: true
path: true
query-string: false
parameters: false
headers: false
headers-pattern: ".*"
cookies: false
remote-addr: false
remote-host: false
session-id: false
level:
root: warn
org.springframework: warn
org.georchestra.gateway: info
org.georchestra.gateway.accesslog: info
---
spring.config.activate.on-profile: logging_debug
logging:
level:
root: info
org.springframework: info
org.georchestra.gateway: info
org.georchestra.gateway.accesslog: info
org.georchestra.gateway.logging: info

---
spring.config.activate.on-profile: logging_debug_security
logging:
level:
org.springframework.security: info
org.georchestra.gateway.security: info
Loading