Skip to content

Command Line Usage

Rafael JPD edited this page Mar 3, 2025 · 1 revision

Command-line Script

usage: log_validator [-h] -p PATH [-s SAMPLE_SIZE] [-b BUFFER_SIZE] [-d DAYS_DELTA] [--no_path_validation] [--no_content_validation]

options:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  File or directory to be checked
  -s SAMPLE_SIZE, --sample_size SAMPLE_SIZE
                        Sample size to be checked (must be between 0 and 1)
  -b BUFFER_SIZE, --buffer_size BUFFER_SIZE
                        Buffer size for file type checking
  -d DAYS_DELTA, --days_delta DAYS_DELTA
                        Number of days to determine the threshold for significant date difference
  --no_path_validation  Deactivate path validation
  --no_content_validation
                        Deactivate content validation

Usage examples

Analysis of a single file

log_validator -p /home/user/2022-03-01_scielo-br.log.gz

Analysis of all files in a directory

log_validator -p /home/user

Content analysis (ignores path and filename)

log_validator -p /home/user/2022-03-01_scielo-br.log.gz --no_path_validation

Path and filename analysis (ignores content)

log_validator -p /home/user/2022-03-01_scielo-br.log.gz --no_content_validation

Analysis of only 10% of the log lines

log_validator -p /home/user/2022-03-01_scielo-br.log.gz --sample_size 0.1

Analysis of 100% of the log lines

log_validator -p /home/user/2022-03-01_scielo-br.log.gz --sample_size 1.0

Clone this wiki locally