Skip to main content

No project description provided

Project description

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.

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

donjon_quicklog-1.0.2.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-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: donjon_quicklog-1.0.2.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.tar.gz
Algorithm Hash digest
SHA256 2282abc95cbdf3c77d403af7438216567494c118493fc08667bb0c300b602593
MD5 53dfb589bc3f68fdf09f79e7a059e9ce
BLAKE2b-256 5ca2558c674460232c3c6c2212cdf2e95606ee5fd83c82aaeab84c2776609778

See more details on using hashes here.

File details

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

File metadata

  • Download URL: donjon_quicklog-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • 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-py3-none-any.whl
Algorithm Hash digest
SHA256 08c8a4359c0bcbf7e4725dbb251bb27451c9416220729dab12acf81aec9f6d7e
MD5 afbdc67ac3fec38c4072fd86fa280c23
BLAKE2b-256 42625ad30a104e035a6202310771a65e4a8bf8cdffddf19e49701aa27fda48c0

See more details on using hashes here.

Supported by

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