...
Code Block |
---|
title | Invocation 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 |
---|
title | Example for Invocation of Log Anonymizer Script |
---|
|
loganonymize-anonymizerlogs.sh --log-file=/var/sos-berlin.com/js7/controller/logs/controller.log |
...
Code Block |
---|
title | Example 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 |
---|
title | Example 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 |
---|
title | Example for Export of Rules to a File |
---|
|
loganonymize-anonymizerlogs.sh --export-rules=/tmp/rules.yaml
|
...
Code Block |
---|
title | Example 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 |
...
- Note that version numbers of binary files can change over time. The examples below assume binary Java related files as provided with Release 2.4.0.
- Users can copy the following Java related files from the .
/lib/3rd-party,
./lib/sos, ./lib/stdout
directories to the location where they want to use Log Anonymizer:
Code Block |
---|
title | Java binary files required by Log Anonymizer |
---|
linenumbers | true |
---|
|
./lib/sos/sos-commons-util-2.4.0.jar
./lib/stdout/log4j2.xml
./lib/3rd-party/commons-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/3rd-party/snakeyaml-1.30.jar |
...
The directory hierarchy is assumed to look like this:
loganonymize-anonymizerlogs.sh | .cmd
sos-commons-util-2.4.0.jar
stdout
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.jar
...