Skip to main content

A package for logging in plaintext

Project description

Maplewood

maplewood is a Python Library for creating logfiles in Plain Text(.txt) Format

Compatibility

maplewood has been tested to work on Windows, but should work on Linux and MacOS as well

Installing

maplewood can be installed using pip or any PyPI package managers

pip install maplewood

Usage

# import the chainsaw module 
# containing the 'Chainsaw' class
from maplewood import chainsaw as cs

# creates a log.txt file in ./logs/
example_log = cs.Chainsaw()

# To log an event, we open the file first
example_log.open()

# To write to the log file
example_log.write(success=True, message="Example Task Executed")
# OR
# if we define a default success or failure message
example_log.update(success="Example success",
                   failure="Example Failure",
                   module="example")
example.log(False) # writes default fail state
example.log(True)  # writes default pass state

# we can close the file if needed
example_log.close()
# and reopen
example_log.open()

# to check if log file is open
example_log.is_open() # -> bool

# remember to close the file
example_log.close()

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

maplewood-0.3.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

maplewood-0.3.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file maplewood-0.3.0.tar.gz.

File metadata

  • Download URL: maplewood-0.3.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for maplewood-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cc461baadb6f2446a54c8ee51934d897a7e21bf4ec558f5c4f013f8c68ff8d15
MD5 a9d15ac8bde7640f8c5787d607a70170
BLAKE2b-256 4bcf5373478cfc66a5525a1793fed20ae6db347a0fe7e78317494a6c1fe9a791

See more details on using hashes here.

File details

Details for the file maplewood-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: maplewood-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for maplewood-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56b6c9e18e5855e224d687c59531e2c9a77579c3545685c2f118d61901b36566
MD5 ab42e329cce2b35dabc638c6c9618ad7
BLAKE2b-256 e9e96df43ab8d7871d2916338d13f20f78b57c909efa774365a45171a6ec7ad5

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