geoserver-tomcat8-valve

Tomcat AccessLogValve that supports writing GeoServer user information

License

License

Categories

Categories

Tomcat Container Application Servers Geo Business Logic Libraries Geospatial
GroupId

GroupId

com.spatineo
ArtifactId

ArtifactId

geoserver-tomcat8-valve
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

geoserver-tomcat8-valve
Tomcat AccessLogValve that supports writing GeoServer user information
Project URL

Project URL

https://github.com/spatineo/geoserver-tomcat8-valve
Project Organization

Project Organization

Spatineo Inc
Source Code Management

Source Code Management

http://github.com/spatineo/geoserver-tomcat8-valve/tree/master

Download geoserver-tomcat8-valve

How to add to project

<!-- https://jarcasting.com/artifacts/com.spatineo/geoserver-tomcat8-valve/ -->
<dependency>
    <groupId>com.spatineo</groupId>
    <artifactId>geoserver-tomcat8-valve</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.spatineo/geoserver-tomcat8-valve/
implementation 'com.spatineo:geoserver-tomcat8-valve:1.0'
// https://jarcasting.com/artifacts/com.spatineo/geoserver-tomcat8-valve/
implementation ("com.spatineo:geoserver-tomcat8-valve:1.0")
'com.spatineo:geoserver-tomcat8-valve:jar:1.0'
<dependency org="com.spatineo" name="geoserver-tomcat8-valve" rev="1.0">
  <artifact name="geoserver-tomcat8-valve" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.spatineo', module='geoserver-tomcat8-valve', version='1.0')
)
libraryDependencies += "com.spatineo" % "geoserver-tomcat8-valve" % "1.0"
[com.spatineo/geoserver-tomcat8-valve "1.0"]

Dependencies

provided (1)

Group / Artifact Type Version
org.apache.tomcat : tomcat-catalina jar 8.5.46

Project Modules

There are no modules declared in this project.

GeoserverTomcatAccessLogValve

This custom valve extends on the normal Tomcat AccessLogValve and adds functionality that is able to write the GeoServer user in the access log valve.

The implementation should be compatible with any version of Tomcat 8.5.x and probably works with other versions as well.

Installation

Add the jar file in the lib/ folder within your Apache Tomcat instance.

Configuration

In addition to the pattern codes supported by the default AccessLogValve implementation, this valve supports the following additional patterns:

  • %{geoserver-user}G - writes the user logged in to GeoServer (or '-')
  • %{geoserver-or-normal-user}G - as above but if not logged in GeoServer, behave as %u The valve supports all pattern codes that are supported by Tomcat by default. In addition to those,

In your server.xml, replace your access log valve className with org.geoserver.tomcat.GeoserverTomcatAccessLogValve. For example:

<Valve className="org.geoserver.tomcat.GeoserverTomcatAccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %{geoserver-user}G %t &quot;%r&quot; %s %b" />

Note that the pattern above is the default configuration from Tomcat except %u is replaced by %{geoserver-user}G

com.spatineo

Spatineo

Spatineo is the European quality assurance expert for spatial web services with strong INSPIRE and OGC expertise

Versions

Version
1.0