Skip to main content

Jython package for using SciJava's LogService for logging.

Project description

SciJava log handler for Python 🐍☕📑

DOI

A very thin Python package (mavenized for ImageJ2) to use the SciJava LogService as a handler for Python's logging facility. See the wiki page about Logging for more details about ImageJ's logging framework.

Developed and provided by the Imaging Core Facility (IMCF) of the Biozentrum, University of Basel, Switzerland.

🚫 WARNING 🚫

The PyPI packages of this project are exclusively useful for automatic testing of e.g. the imcflibs package! They have no real use-case in the standard CPython world 🐍🌍!

Example usage

The code in extra/scripts/example.py demonstrates how to use the handler in an ImageJ2 Python script utilizing the fabulous Script Parameters for retrieving the LogService instance.

Running this code from ImageJ will result in the following messages being printed to the console or the Log window, depending on how you launch ImageJ:

[Fri Jan  5 12:25:15 CET 2018] [ERROR] +++ new round of messages (level WARNING) +++
[Fri Jan  5 12:25:15 CET 2018] [WARNING] warn log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] error log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] critical log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] --- finished round of messages (level WARNING) ---
[Fri Jan  5 12:25:15 CET 2018] [ERROR] +++ new round of messages (level INFO) +++
[Fri Jan  5 12:25:15 CET 2018] [INFO] info log message
[Fri Jan  5 12:25:15 CET 2018] [WARNING] warn log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] error log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] critical log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] --- finished round of messages (level INFO) ---
[Fri Jan  5 12:25:15 CET 2018] [ERROR] +++ new round of messages (level DEBUG) +++
[Fri Jan  5 12:25:15 CET 2018] [DEBUG] debug log message
[Fri Jan  5 12:25:15 CET 2018] [INFO] info log message
[Fri Jan  5 12:25:15 CET 2018] [WARNING] warn log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] error log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] critical log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] --- finished round of messages (level DEBUG) ---
[Fri Jan  5 12:25:15 CET 2018] [ERROR] +++ new round of messages (level WARNING) +++
[Fri Jan  5 12:25:15 CET 2018] [WARNING] warn log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] error log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] critical log message
[Fri Jan  5 12:25:15 CET 2018] [ERROR] --- finished round of messages (level WARNING) ---

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

sjlogging-0.5.4.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

sjlogging-0.5.4-py2.py3-none-any.whl (18.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sjlogging-0.5.4.tar.gz.

File metadata

  • Download URL: sjlogging-0.5.4.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.0-125-generic

File hashes

Hashes for sjlogging-0.5.4.tar.gz
Algorithm Hash digest
SHA256 5fb1a4e6338088bdbf9d943a867bf1bc6f77031ec48dbb7dd96f09abb0aaaa92
MD5 1d9363791957abc58465f3339767c52c
BLAKE2b-256 1201642d78b2c4be39fc0c1c7f103c9e13194fda1655d246aa35f5398d4b4797

See more details on using hashes here.

File details

Details for the file sjlogging-0.5.4-py2.py3-none-any.whl.

File metadata

  • Download URL: sjlogging-0.5.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.0-125-generic

File hashes

Hashes for sjlogging-0.5.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e7db0a34ac2788a0404ac02beee232132f3946330cc04d28a37eea9adb3cfd42
MD5 a2fbe3fefd18944ac7758a347b5d084c
BLAKE2b-256 32662032e35c0e59c611295f3d8b6024bd94d88f9b5111ffaff2bbac9837de67

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