-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log loading of resources from *.loc files #3099
Conversation
@@ -465,6 +465,8 @@ def parse_file_fields( self, reader, errors=None, here="__HERE__" ): | |||
if errors is not None: | |||
errors.append( line_error ) | |||
log.warning( line_error ) | |||
if hasattr(reader, "name"): | |||
log.info("Loaded %i lines from '%s' for '%s'", len(rval), reader.name, self.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.debug
seems indeed more appropriate.
As suggested and seconded by @nsoranzo, switched to logging this at debug level instead (branch updated with force push). |
Example output: ``` $ grep "lines from" paster.log galaxy.tools.data DEBUG 2016-10-26 10:24:22,742 Loaded 0 lines from 'tool-data/all_fasta.loc' for 'all_fasta' galaxy.tools.data DEBUG 2016-10-26 10:24:22,753 Loaded 0 lines from 'tool-data/bfast_indexes.loc' for 'bfast_indexes' galaxy.tools.data DEBUG 2016-10-26 10:24:22,848 Loaded 24 lines from 'tool-data/blastdb_p.loc' for 'blastdb_p' galaxy.tools.data DEBUG 2016-10-26 10:24:22,859 Loaded 0 lines from 'tool-data/maf_index.loc' for 'indexed_maf_files' galaxy.tools.data DEBUG 2016-10-26 10:24:22,865 Loaded 0 lines from 'tool-data/ngs_sim_fasta.loc' for 'ngs_sim_fasta' galaxy.tools.data DEBUG 2016-10-26 10:24:22,878 Loaded 0 lines from 'tool-data/perm_base_index.loc' for 'perm_base_indexes' galaxy.tools.data DEBUG 2016-10-26 10:24:22,890 Loaded 0 lines from 'tool-data/perm_color_index.loc' for 'perm_color_indexes' galaxy.tools.data DEBUG 2016-10-26 10:24:22,895 Loaded 0 lines from 'tool-data/picard_index.loc' for 'picard_indexes' galaxy.tools.data DEBUG 2016-10-26 10:24:22,899 Loaded 0 lines from 'tool-data/picard_index.loc' for 'srma_indexes' galaxy.tools.data DEBUG 2016-10-26 10:24:22,937 Loaded 0 lines from 'tool-data/mosaik_index.loc' for 'mosaik_indexes' galaxy.tools.data DEBUG 2016-10-26 10:24:22,943 Loaded 0 lines from 'tool-data/twobit.loc' for 'twobit' ... galaxy.tools.data DEBUG 2016-10-26 10:24:24,036 Loaded 0 lines from '/mnt/shared/galaxy/galaxy-dist/tool-data/toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus/7f3c448e119b/blastdb.loc' for 'blastdb' galaxy.tools.data DEBUG 2016-10-26 10:24:24,106 Loaded 0 lines from '/mnt/shared/galaxy/galaxy-dist/tool-data/toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus/7f3c448e119b/blastdb_p.loc' for 'blastdb_p' galaxy.tools.data DEBUG 2016-10-26 10:24:24,112 Loaded 0 lines from '/mnt/shared/galaxy/galaxy-dist/tool-data/toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus/7f3c448e119b/blastdb_d.loc' for 'blastdb_d' ```
Thank you @peterjc, this should indeed be helpful. |
Great - it already helped me resolve why some of my |
Example output:
I'm happy to make this a DEBUG log entry, rather than info level as implemented.
The reason for logging this is to help Galaxy administrators struggling with
*.loc
files failing to take effect - in my casetool-data/blastdb_p.loc
is loading buttool-data/blastdb.loc
andtool-data/blastdb_d.loc
appear to be ignored, see also #3095 and #3098