Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Users who wish to run the Log Anonymizer outside of a JS7 installation can

  • copy a number of binary Java related files as available from the Controller or Agent installation,
  • create a shell script to invoke Log Anonymizer.

Java

...

related Files required by Log Anonymizer

The following binary files can be found from a Controller or Agent installation for Unix or Windows.

  • Note that version numbers of binary files can change over time. The below examples assume binary files as provided with Release 2.4.0.
  • Users can copy the following binary Java related files from the ./lib/3rd-party and , ./lib/sos, ./lib/stdout directories to the location from which they want to use Log Anonymizer:

Code Block
titleJava binary files required by Log Anonymizer
linenumberstrue
./lib/3rd-party/org.apache.logging.log4j.log4j-slf4j-implsos/sos-commons-util-2.174.20.jar
./lib/3rd-partystdout/org.slf4j.slf4j-api-1.7.36.jarlog4j2.xml
./lib/3rd-party/snakeyaml-1.30commons-io-2.7.jar
./lib/3rd-party/org.apache.logging.log4j.log4j-api-2.17.2.jar
./lib/3rd-party/org.apache.logging.log4j.log4j-core-2.17.2.jar
./lib/3rd-party/org.apache.logging.log4j.log4j-slf4j-impl-2.17.2.jar
./lib/3rd-party/org.slf4j.slf4j-api-1.7.36.jar
./lib/sos3rd-party/sos-commons-util-2.4.0.snakeyaml-1.30.jar

Shell Script to run Log Anonymizer

...

Code Block
titleExample for Invocation of Log Anonymizer from an individual Script on Windows
linenumberstrue
@echo off

set JAVA_BIN=java.exe
if exist "%JAVA_HOME%\bin\java.exe" set JAVA_BIN=%JAVA_HOME%\bin\java.exe

set script_dir=%~dp0
set cp=-classpath "%script_dir%lib\sos\*;%script_dir%lib\3rd-party\*;%script_dir%lib\stdout"

"%JAVA_BIN%" %JAVA_OPTIONS% %cp% com.sos.commons.util.loganonymizer.SOSLogAnonymizer %*


Explanation:

The directory hierarchy is assumed like this:

  • log-anonymizer.sh | .cmd
    • lib
      • sos
        • sos-commons-util-2.4.0.jar
      • stdout
        • log4j2.xml
      • 3rd-party
        • commons-io-2.7.jar
        • org.apache.logging.log4j.log4j-api-2.17.2.jar
        • org.apache.logging.log4j.log4j-core-2.17.2.jar
        • org.apache.logging.log4j.log4j-slf4j-impl-2.17.2.jar
        • org.slf4j.slf4j-api-1.7.36.jar
        • snakeyaml-1.30
  • .jarsossos-commons-util-2.4
        • .
  • 0.
        • jar
  • stdoutlog4j2.xml