Skip to main content

QuickLog

QuickLog is a tiny Python3 library for logging experimental results. It uses JSON to serialize log records into human readable text files. Appending new records to a log file does not require parsing the current log data, making logging performance scallable. Parsing log results may however require some time, but complexity is $O(n)$ where n is the number of records in the log file.

QuickLog also features trace save to a traces database (which is a structured directory). Each trace is referenced in the log file via a unique random identifier. For this, the TRACESDIR environment variable should refer to the traces database directory. If this environment variable is not defined, ./traces directory is used.

This library is meant to be very simple to use.

Logging example

import quicklog

log = quicklog.Log()
for i in range(100):
    # new_record creates a dict with session Id, record Id and timestamp.
    record = quicklog.new_record()
    # Add experiment data
    record['result'] = do_experiment()
    log.append(record)

Parsing log example

import quicklog

for record in quicklog.read_log():
    rid = record['id']
    result = record['result']
    print(f'{rid}: {result}')

Installation

Quicklog is available on pypi. You can install it with pip3:

pip3 install donjon-quicklog

If you want to install the latest version from the repository, clone the repository then use pip3 to install the package.

pip3 install ./quicklog

Licensing

Quicklog is released under GNU Lesser General Public Licence version 3 (LGPLv3). See COPYING and COPYING.LESSER for license details.

Download files

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

Source Distribution

donjon_quicklog-1.0.2.post1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

donjon_quicklog-1.0.2.post1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file donjon_quicklog-1.0.2.post1.tar.gz.

File metadata

  • Download URL: donjon_quicklog-1.0.2.post1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0

File hashes

Hashes for donjon_quicklog-1.0.2.post1.tar.gz
Algorithm Hash digest
SHA256 15c5cfbbe9063961b4f5d1160f71ea52b191337a1c5384ee70cc6f46d9b44b25
MD5 b6e0812f6f656527fc1e6b654e90ca5b
BLAKE2b-256 bc97ca0f0b19d2cf289feb4648f46701c1977779927b38dba8034fd5c5d85b3d

See more details on using hashes here.

File details

Details for the file donjon_quicklog-1.0.2.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for donjon_quicklog-1.0.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c2cbef3c85a6f8da33eff03690205ca76d53b7157ce5034a5026705a53be59b
MD5 c1b3d4f1a4c649102f02b6edbf6ce621
BLAKE2b-256 5a47be30988de080326e7adb9ac00cd27cec87ebaac009e0535b74aa4efa706b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2.post1 This release

2 files

1.0.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page