Skip to content

This Library Somehow Messes with My Logging Config #111

@barmanroys

Description

@barmanroys

System

Angle version 0.5.6
UV 0.8.22
Python 3.12
Ubuntu 24.04

I have used the python logging library for sometime, and recently, it was showing some weird behaviour (described below). After some investigation, I realised the surprises were introduced when I was importing angle_emb module. Here is a minimal code sample.

#!/usr/bin/env python3
# encoding: utf-8

import logging
import angle_emb # The problematic import line 

logging.basicConfig(
    format="%(asctime)s|%(levelname)s: %(message)s",
    datefmt="%H:%M:%S, %d-%b-%Y",
    level=logging.DEBUG,
)

logging.info(msg='This is an information log')
logging.debug(msg='This is a debug log')

Expected Output

21:27:39, 11-Oct-2025|INFO: This is an information log
21:27:39, 11-Oct-2025|DEBUG: This is a debug log

My Output

INFO:root:This is an information log

So basically, two issues

  • Debug logs are ignored
  • The logging timestamp is suppressed

Once you remove or comment out the problematic import, you get the expected output.

Am I doing something wrong with the logging library? Or, is there a way to not let angle mess with my logging config? Or is it a bug?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions