Skip to main content

GUI for Python's logging module

Project description

cutelog

This is a graphical log viewer for Python’s standard logging module. It can be targeted with a SocketHandler with no additional setup (see Usage).

The program is in beta: it’s lacking some features and may be unstable, but it works. cutelog is cross-platform, although it’s mainly written and optimized for Linux.

Features

  • Allows any number of simultaneous connections

  • Customizable look of log levels and columns, with presets for each

  • Filtering based on level and namespace, as well as filtering by searching

  • Search through all records or only through filtered ones

  • View exception tracebacks or messages in a separate window

  • Dark theme (with its own set of colors for levels)

  • Pop tabs out of the window, merge records of multiple tabs into one

  • Save/load records to/from a file in JSON format

Installation

If you’re using Linux, install PyQt5 (or PySide2) from your package manager before installing cutelog (package name is probably python3-pyqt5 or python-pyqt5). Or just run pip install pyqt5 to install it from pip, which is sub-optimal.

$ pip install --upgrade cutelog

Or install the latest development version from the source:

$ pip install git+https://github.com/busimus/cutelog.git

Requirements

  • Python 3.5 (or newer)

  • PyQt5 (preferably 5.6 or newer) or PySide2

  • QtPy

Usage

  1. Start cutelog

  2. Put the following into your code:

import logging
from logging.handlers import SocketHandler

log = logging.getLogger('Root logger')
log.setLevel(1)  # to send all messages to cutelog
socket_handler = SocketHandler('127.0.0.1', 19996)  # default listening address
log.addHandler(socket_handler)
log.info('Hello world!')

Afterwards it’s recommended to designate different loggers for different parts of your program with log_2 = log.getChild(“Child logger”). This will create “log namespaces” which allow you to filter out messages from various subsystems of your program.

Code, issues, changelog

Visit the project’s GitHub page.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cutelog-2.1.0-py3-none-any.whl (152.9 kB view details)

Uploaded Python 3

File details

Details for the file cutelog-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: cutelog-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 152.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for cutelog-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c99a586ef743cde3923a8855b9b65d2709aac504eb2e14a8539d7df1298b7ef8
MD5 87dce6339b5689bded3093190a015724
BLAKE2b-256 86116407c91734ffaee243500e9d3ec6f8d290bf7eab2dbc685ccf304e2d2c3c

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