Skip to content
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

Merged
merged 1 commit into from
Oct 26, 2016

Conversation

peterjc
Copy link
Contributor

@peterjc peterjc commented Oct 26, 2016

Example output:

$ grep "lines from" paster.log
galaxy.tools.data INFO 2016-10-26 10:24:22,742 Loaded 0 lines from 'tool-data/all_fasta.loc' for 'all_fasta'
galaxy.tools.data INFO 2016-10-26 10:24:22,753 Loaded 0 lines from 'tool-data/bfast_indexes.loc' for 'bfast_indexes'
galaxy.tools.data INFO 2016-10-26 10:24:22,848 Loaded 24 lines from 'tool-data/blastdb_p.loc' for 'blastdb_p'
galaxy.tools.data INFO 2016-10-26 10:24:22,859 Loaded 0 lines from 'tool-data/maf_index.loc' for 'indexed_maf_files'
galaxy.tools.data INFO 2016-10-26 10:24:22,865 Loaded 0 lines from 'tool-data/ngs_sim_fasta.loc' for 'ngs_sim_fasta'
galaxy.tools.data INFO 2016-10-26 10:24:22,878 Loaded 0 lines from 'tool-data/perm_base_index.loc' for 'perm_base_indexes'
galaxy.tools.data INFO 2016-10-26 10:24:22,890 Loaded 0 lines from 'tool-data/perm_color_index.loc' for 'perm_color_indexes'
galaxy.tools.data INFO 2016-10-26 10:24:22,895 Loaded 0 lines from 'tool-data/picard_index.loc' for 'picard_indexes'
galaxy.tools.data INFO 2016-10-26 10:24:22,899 Loaded 0 lines from 'tool-data/picard_index.loc' for 'srma_indexes'
galaxy.tools.data INFO 2016-10-26 10:24:22,937 Loaded 0 lines from 'tool-data/mosaik_index.loc' for 'mosaik_indexes'
galaxy.tools.data INFO 2016-10-26 10:24:22,943 Loaded 0 lines from 'tool-data/twobit.loc' for 'twobit'
...
galaxy.tools.data INFO 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 INFO 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 INFO 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'

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 case tool-data/blastdb_p.loc is loading but tool-data/blastdb.loc and tool-data/blastdb_d.loc appear to be ignored, see also #3095 and #3098

@galaxybot galaxybot added this to the 16.10 milestone Oct 26, 2016
@@ -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)
Copy link
Member

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.

@peterjc
Copy link
Contributor Author

peterjc commented Oct 26, 2016

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'
```
@martenson
Copy link
Member

Thank you @peterjc, this should indeed be helpful.

@peterjc peterjc deleted the patch-5 branch October 26, 2016 14:36
@peterjc
Copy link
Contributor Author

peterjc commented Oct 26, 2016

Great - it already helped me resolve why some of my *.loc files were being ignored :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants