Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • News
    • Getting started
    • Introduction video
      Welcome to Wiki
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

Side Menu

  • Overview
  • Activity
    Activity
  • News
  • Forums
  • 00 - Business Architecture
    00 - Business Architecture
  • 01 - Software Architecture Document (SAD)
    01 - Software Architecture Document (SAD)
  • 02 - Developer's Cookbook
    02 - Developer's Cookbook
  • 03 - REST Resource Design
    03 - REST Resource Design
  • 04 - Installation Notes
    04 - Installation Notes
  • 05 - Support
    05 - Support

Content

You are here:
  1. 02 - Developer's Cookbook
  2. 02.02 - Runtime

02.02 - Runtime

  • More
    • Print
    • Table of contents

[R2] Technical Service Logging (TSL)

Issue To find performance and throughput bottlenecks it is a good start to measure the time execution of methods and persist this information so it can be monitored over time.

Solution This kind of logging is addressed with Technical Service Logging (TSL). A particular log appender is used to capture the MEASURED logs and forward to a dedicated logfile with the file extension .tslog.

TSL can be turned on by setting the log level of the MEASURED category to INFO or higher. The logs must be send to a predefined appender with name TSL:

<logger name="MEASURED" level="OFF">

    <appender-ref ref="TSL"/>

</logger>

Like all other logs also the TSL is tenant-aware and a log file is written for each tenant. The log looks like:

spGZLZ COMMON-Service 2019-05-03 11:43:30.080  DEBUG  [35m[63638/4] [0;39m  [2m- [0;39m [SERVICE_LAYER_ACCESS                    ] : [S]>> Method call: execution(TransportUnitServiceImpl.create(..))

spGZLZ COMMON-Service 2019-05-03 11:43:45.098  DEBUG  [35m[63638/1] [0;39m  [2m- [0;39m [SERVICE_LAYER_ACCESS                    ] : [S]<< execution(TransportUnitServiceImpl.create(..)) took [16] (ms)

If you want to see the TSL on the console instead then just refer to STDOUT instead of TSL:

<logger name="MEASURED" level="INFO">

    <appender-ref ref="TSL"/>

    <appender-ref ref="STDOUT"/>

</logger>

[R1] Doing Tomcat URL Encoding right

Problem Incoming http requests with URL parameters or request body data aren’t encoded correctly - even the request is decoded right. For example a request parameter that is decoded to %E6%8C could be encoded to æŒ but not to the expected String.

Solution By default, Tomcat uses ISO-8859-1 character encoding. The HTTP Connector in Tomcat’s server configuration must be configured to set the URL encoding to UTF-8. Open the server’s server.xml, search for the http connector and add the attribute "URIEncoding" as follows:

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8"/>
Loading...