Skip to content

Comments

Add getLoggerNames and getConfiguredLoggers#76

Open
colonelpanic8 wants to merge 1 commit intohaskell-hvr:masterfrom
colonelpanic8:feature/get-logger-names
Open

Add getLoggerNames and getConfiguredLoggers#76
colonelpanic8 wants to merge 1 commit intohaskell-hvr:masterfrom
colonelpanic8:feature/get-logger-names

Conversation

@colonelpanic8
Copy link

Summary

  • Adds getLoggerNames :: IO [String] — returns the names of all loggers in the global hierarchy
  • Adds getConfiguredLoggers :: IO [(String, Priority)] — returns names and levels of loggers with an explicitly set Priority

These functions expose read-only access to the internal logTree, enabling library consumers to build introspection tools. My use case is a D-Bus interface (dbus-hslogger) that reports which loggers are active and at what level, without requiring the caller to track that state separately.

Test plan

  • All existing tests pass (cabal test — 6/6)
  • Functions are read-only (readMVar), no mutation of global state

🤖 Generated with Claude Code

These functions allow library consumers to enumerate loggers that have
been registered in the global hierarchy, which is useful for building
introspection tools (e.g. D-Bus interfaces that report active log levels).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant