Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

πŸβ˜•πŸ“‘ Jython package for using SciJava's LogService for logging.

License

Notifications You must be signed in to change notification settings

imcf/jython-scijava-logging

Repository files navigation

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) ---

About

πŸβ˜•πŸ“‘ Jython package for using SciJava's LogService for logging.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /