Versions Compared

Key

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

...

Code Block
titleInvocation of Log Anonymizer Script
Usage: loganonymize-anonymizerlogs.sh [Options]

  Options:
    -l | --log-file=<log-file>       | optional: location of log files to be anonymized; a single file, directory or wildcards can be specified;
                                                 the argument can occur any number of times
    -o | --output-dir=<directory>    | optional: output directory for anonymized log files
    -r | --rules-file=<rules-file>   | optional: path to a YAML file holding rules for anonymization; by default built-in rules will be applied
    -e | --export-rules=<rules-file> | optional: path to a YAML file to which built-in rules will be exported

...

Code Block
titleExample for Invocation of Log Anonymizer Script
loganonymize-anonymizerlogs.sh --log-file=/var/sos-berlin.com/js7/controller/logs/controller.log

...

Code Block
titleExample for Invocation of Log Anonymizer Script for a number of Log Files
loganonymize-anonymizerlogs.sh --log-file=/var/sos-berlin.com/js7/joc/logs/joc.log  \
                  --log-file=/var/sos-berlin.com/js7/joc/logs/joc-debug.log \
                  --output-dir=/tmp/logs

...

Code Block
titleExample for Invocation of Log Anonymizer Script with Wildcards for Log Files
loganonymize-anonymizerlogs.sh --log-file=/var/sos-berlin.com/js7/joc/logs/joc*  \
                  --output-dir=/tmp/logs

...

Code Block
titleExample for Export of Rules to a File
loganonymize-anonymizerlogs.sh --export-rules=/tmp/rules.yaml

...

Code Block
titleExample for Invocation of Log Anonymizer Script with individual Rules from a File
loganonymize-anonymizerlogs.sh --log-file=/var/sos-berlin.com/js7/agent_4445/logs/*.log \
                  --output-dir=/tmp/logs \
                  --rules-file=/tmp/rules.yaml

...

The directory hierarchy is assumed like this:

  • loganonymize-anonymizerlogs.sh | .cmd
    • lib
      • sos
        • sos-commons-util-2.4.0.jar
      • stdout
        • log4j2.xml
      • 3rd-party
        • 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.jar

...