Skip to main content

Functions required by the access-logs-local-driver

Project description

Load the content of gzipped Apache HTTP log files Exclude bots, scrapers, etc., select URLs matching the provided regex(es), and generate a CSV of the relevant log entries.

Take postprocessed logs and strip out multiple hits in sessions, and resolve URLs to the chosen URI_SCHEME (e.g. info:doi).

We strip out entries where the same (IP address * user agent) pair has accessed a URL within the last SESSION_TIMEOUT (e.g. half-hour)

Additionally, we convert the URLs to ISBNs and collate request data by date, outputting a CSV for ingest via the stats system.

Release Notes:

[0.0.7] - 2024-01-05

Changed:
  • Deletion of the spiders filter in process_download_logs.py

[0.0.6] - 2023-08-13

Changed:
  • Refactored driver logic

  • breaking | Changed parameters for the Request.__init__() method
    • Removed re_match_dict parameter

    • Added timestamp and user_agent parameters

  • Changed Request.timestamp from type time to datetime

  • Changed LogStream to use the new Request.__init__()

  • Expanded range for LogStream.logfile_names logic to include files within 1 day of the search_date

  • LogStream.lines() yields Request objects, not str values

  • LogStream.filter_in_line_request() only yields one line per measure

[0.0.5] - 2023-07-03

Changed:
  • Added start_date and end_date for searching in the log files

  • Added the measure_uri to the result

[0.0.4] - 2023-07-31

Changed:
  • Update file structure and name of the driver

[0.0.3] - 2023-07-25

Changed:
  • Update requirements

  • Update using a pyproject.toml file as well as the new deployment structure

[0.0.2] - 2023-07-11

Added:
  • Unittests

Changed:
  • Moved the files out of the package and get the file’s data as parameters and return the filtered data.

  • renamed the plugin to access-logs-local

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

access_logs_local-0.0.7.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

access_logs_local-0.0.7-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file access_logs_local-0.0.7.tar.gz.

File metadata

  • Download URL: access_logs_local-0.0.7.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for access_logs_local-0.0.7.tar.gz
Algorithm Hash digest
SHA256 f3ca836d4fc80f58c2b6de96820ed04240d6c0d62d72a526f15a7762e1dea900
MD5 23fffa9274c9ac06085f27108a0b02a1
BLAKE2b-256 bba31773dff53526344b81f59850c04c809a4579809338455f34aa0e20526764

See more details on using hashes here.

File details

Details for the file access_logs_local-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for access_logs_local-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ab74b93f1e3ed4153b10cdadf409ef063be295054c2da2c8b48b95ba37561604
MD5 b8ed08ba13f789271e9e06a6b0f7d867
BLAKE2b-256 0d0841d1a2015dadff26d0d799f76a0a16487ac9679e23d70226e8cef27d0718

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page