Jython package for using SciJava's LogService for logging.
Project description
SciJava log handler for Python 🐍☕📑
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sjlogging-0.5.3.tar.gz
.
File metadata
- Download URL: sjlogging-0.5.3.tar.gz
- Upload date:
- Size: 16.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb0acdf1c607454b391291d5d819568d4c52b09e1e8ce40a98891b9c00f1f41a |
|
MD5 | 907c2455880d31418413d9feb5fef174 |
|
BLAKE2b-256 | acd62781aac712aef343b75a62657107ba7140e9ec46e552b0f147536713b7b0 |
File details
Details for the file sjlogging-0.5.3-py2.py3-none-any.whl
.
File metadata
- Download URL: sjlogging-0.5.3-py2.py3-none-any.whl
- Upload date:
- Size: 18.0 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5f26638e1cad25f50d6035c28c3ee9d277644385f61e1218afcb229f76716a6 |
|
MD5 | 40594df6f9bcd6c0efcc15f4680dadee |
|
BLAKE2b-256 | 2a52cc40ab8fc6215dc7e8f7758c508495c5718e18a89909eb27a49d71c45c23 |