Open
Conversation
…en they are built
jdavcs
reviewed
Sep 10, 2025
| resource_path, | ||
| ) | ||
| from galaxy.util.themes import flatten_theme | ||
| from ..util.logging import set_logging_levels_from_config |
jdavcs
reviewed
Sep 10, 2025
| def _check_against_root(self, key: str): | ||
| def get_path(current_path, initial_path): | ||
| # TODO: Not sure why this is needed for the logging API tests... | ||
| if initial_path is None: |
There was a problem hiding this comment.
this is very dangerous: it changes how this function behaves, and the function is part of a nontrivial path resolution algorithm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds several new features to enhance logging in Galaxy:
TRACEto the Python logging framework,galaxy.ymlfile,See galaxyproject#19580
Claude Code is responsible for the user interface and the bulk of this readme. The rest was hand-coded before I discovered the magic of AI.
1. Backend Enhancements
New Logging API (
lib/galaxy/webapps/galaxy/api/logging.py)GET /api/logging: Returns comprehensive logger information including:
POST /api/logging/{logger_name}: Sets logger levels with features:
galaxy.*sets level for all Galaxy loggers)New Logging Utilities (
lib/galaxy/util/logging/__init__.py)New Logging Configuration Options (
config/galaxy.yml)The current methods of logging configuration are still supported and remain unchanged, but a new section has been added to
galaxy.ymlthat allows administrators to quickly and easily set logging levels.Groups of loggers can have their logging levels set by using a
.*wildcard. The above configuration sets all of Galaxy's loggers to theINFOlevel and then changes other package's loggers as desired. For example, all loggers in thegalaxy.webapps.galaxy.apipackage and below will use theDEBUGlogging level, while thegalaxy.webapps.galaxy.api.logginglogger will use theTRACElevel.NOTE Full regular expressions are not supported. The
.*syntax should be read as "starts with". When we setgalaxy.*: INFOthen any logger whose name starts with the stringgalaxy.will have its level set toINFO.2. New Admin Logging Settings Interface
Files Added:
client/src/components/admin/LoggingSettings.vue- New Vue component for logging managementlib/galaxy/webapps/galaxy/api/logging.py- New API endpoints for logging managementlib/galaxy/util/logging/__init__.py- New logging utilities and level management functionsFiles Modified:
client/src/entry/analysis/routes/admin-routes.js- Added import and route for LoggingSettings componentclient/src/components/admin/AdminPanel.vue- Added "Logging Settings" link to Server section menuFeatures:
galaxy.*)API Integration:
/api/loggingendpoints:GET /api/logging- Fetches all logger information with current and effective levelsPOST /api/logging/{logger_name}?level={level}- Sets logger levels (supports wildcards)Access:
The logging settings interface is accessible at
/admin/loggingin the Galaxy admin panel under the "Server" section.3. Testing Notes
Admin Interface Testing:
-[x] Access Control: Verify only admin users can access
/admin/logging-[x] Logger Display: Confirm logger table loads showing all configured loggers
-[x] Individual Logger Management: Test setting levels for specific loggers
-[x] Wildcard Patterns: Test patterns like
galaxy.*to set multiple logger levels-[ ] Search/Filter: Verify real-time filtering of logger names works correctly
-[x] Dropdown Actions: Test per-logger level changes via dropdown menus
-[ ] Real-time Updates: Confirm level changes take effect immediately
-[x] Color-coded Display: Verify log level badges display with correct colors
API Testing:
-[x] GET /api/logging: Test endpoint returns complete logger information
-[x] POST /api/logging/{logger_name}: Test setting individual logger levels
-[x] Wildcard Support: Test POST with wildcard patterns (e.g.,
galaxy.*)-[x] Authentication: Verify endpoints require admin authentication
-[ ] Error Handling: Test invalid logger names and levels
4. Backward Compatibility
5. Caveats and Limitations
This is a best effort implementation. We try no to break anything and remain backwards compatible, but if we miss a few edge cases que sera sera.
In particular, during startup, only loggers that have already been created will be configured. Similarly, any changes made using the API or Admin panel will only apply to currently running loggers. Any loggers created after the changes will not reflect the new settings.
How to test the changes?
(Select all options that apply)
License