guardian / mobile-logstash-encoder   1.1.7

GitHub

Placeholder description: @markrichardsg created this with repo-genesis

Scala versions: 2.13 2.12

Mobile Logstash Encoder

Mobile wishes to capture App, Stack and Stage using the simple-configuration AWS identity detection.

This library provides an encoder extends the LogstashEncoder to set the custom fields.

Add the MobileLogstash to an appender like

   <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">    
        <encoder class="com.gu.mobile.logback.MobileLogstash">
            <defaultAppName>[INSERT APP NAME]</defaultAppName>
        </encoder>
        <file>logs/[INSERT APP NAME].log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>logs/[INSERT APP NAME].%d{yyyy-MM-dd}.gz</fileNamePattern>
            <maxHistory>30</maxHistory>
        </rollingPolicy>
   </appender>

Releasing a new version

Newer versions of this library are released into the Sonatype repository, using a manual process on the developer's machine.

In order to release a new version:

  • ensure you have a Sonatype account that has access to the Guardian organisation.
  • ensure you have set up PGP so artifacts can be signed before publishing.

The release process requires being on a development branch, with all required changes committed into the branch, and no unstaged changes locally.

Make sure you set upstream on the branch: git push --set-upstream origin <BRANCH_NAME>

The release process involves steps listed in the releaseProcess setting of build.sbt.

To execute the release process, in the SBT REPL of the project, run the following commands:

clean
release

The cross-compiled released artifacts should appear under:

Once the release is done, merge your branch into main (or master) branch.