Adrian Sampson
7a49c25e86
Merge pull request #1215 from brunal/clean-config-usage
...
Delete useless "config['mypluginname']" mentions
2015-01-12 11:09:47 -08:00
Bruno Cauet
4babc40fd8
Delete useless "config['mypluginname']" mentions
...
Replace with self.config where this is painless.
More plugins would benefit from this update but that requires turning
functions into methods.
2015-01-12 10:55:59 +01:00
Adrian Sampson
34c9caae67
Changelog for logging changes ( #1208 )
2015-01-11 15:44:38 -08:00
Adrian Sampson
e83b6ae297
Logging ( #1208 ): prefix plugin names, expand docs
...
We now add the plugin name to messages in verbose mode. This may not be the
best final policy, but it does help make the output more readable when many
plugins are talking at once.
2015-01-11 15:39:54 -08:00
Adrian Sampson
6d5945daa4
Use logger.getChild ( #1208 )
...
Let the library do the string formatting for us.
2015-01-11 15:08:42 -08:00
Adrian Sampson
f871ef9e21
Verbosity affects plugins ( #1208 )
...
This restores the -v flag affecting plugins. By default, plugin loggers use
the NOTSET level, which just reuses the base `beets` logger level. The level
is only auto-adjusted for the importer when not in verbose mode.
2015-01-11 15:00:20 -08:00
Adrian Sampson
24317fd4c7
Rename BeetsPlugin._import_stages to import_stages
...
For #1208 . Restores backwards-compatibility and matches the development docs.
2015-01-11 14:27:59 -08:00
Adrian Sampson
1aa04e4500
Merge pull request #1208 from brunal/logging
...
Plugins log everything through their `_log` attribute
2015-01-11 14:22:27 -08:00
Adrian Sampson
65fc5f8062
Disable PyPy on Travis
...
Something seems to be wrong: there's a "fatal RPython error" that I can't
reproduce locally.
2015-01-11 12:18:33 -08:00
Adrian Sampson
0cf9956d5b
Unicode logging formats, FFS ( fix #1214 )
2015-01-11 12:10:52 -08:00
Bruno Cauet
b27c5304d1
Merge branch 'master' into logging
...
Conflicts:
beetsplug/fetchart.py
beetsplug/mpdstats.py
2015-01-09 15:15:27 +01:00
Bruno Cauet
2a527598bf
Add logging usage recommendations to docs
2015-01-09 15:07:02 +01:00
Adrian Sampson
e9834ef51c
Changelog for #1212 , fix #773
2015-01-08 13:44:28 -08:00
Adrian Sampson
558d1f9639
Merge pull request #1212 from brunal/mpdstats-react-only-once
...
mpdstats: don't register a natural song change twice
2015-01-08 13:43:46 -08:00
Adrian Sampson
a7be928065
Changelog for #1211 , fix #1177
2015-01-08 13:41:00 -08:00
Adrian Sampson
1654fc82ce
Merge pull request #1211 from brunal/fetchart-check-isfile
...
Fetchart: check that the art found is a file
2015-01-08 13:40:21 -08:00
Frederik “Freso” S. Olesen
4b1f0cbf48
Happy 2015. ;)
...
See 7a410f636b
Command used:
git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Bruno Cauet
23e6760e19
Partial rollback of bpd logging
2015-01-08 17:55:40 +01:00
Bruno Cauet
b7735bd3bf
Don't register a natural song change twice
...
mpd responds twice to an 'idle' command upon a 'natural' song change
(i.e. not a skip). Checking the reason for mpd response avoids
registering twice the song change.
Fix issue #773
2015-01-08 12:39:28 +01:00
Bruno Cauet
2e1b0d589d
Fetchart: check that the art found is a file
...
Fixes issue #1177
2015-01-08 10:58:08 +01:00
Bruno Cauet
1ca33a8a52
Avoid using partial() for the listener callback
...
partial() is not a instance of types.FunctionType so
inspect.getargspec() (used in beets/plugins:422) fails on it.
2015-01-08 10:10:42 +01:00
Bruno Cauet
422a7f6063
replaygain: fix backend instanciation
2015-01-06 22:13:17 +01:00
Bruno Cauet
974155f2bc
Fix pep8 in test
2015-01-06 22:10:30 +01:00
Bruno Cauet
00d5473187
Merge branch master into logging
...
Conflicts:
beetsplug/lyrics.py
2015-01-06 21:46:04 +01:00
Bruno Cauet
b2582c5d62
MusicBrainz collection plugin: delete "print" uses
2015-01-06 21:42:34 +01:00
Bruno Cauet
df82e113e5
Fix embedart tests
2015-01-06 21:42:34 +01:00
Bruno Cauet
f504c78681
Fix usage of embedart by convert plugin
...
Instanciation of EmbedCovertArtPlugin on the fly: there may be several
instances → problem with the listeners it registers?
2015-01-06 21:42:28 +01:00
Bruno Cauet
30562024d2
Fix Lyrics plugin tests
2015-01-06 21:42:10 +01:00
Bruno Cauet
1f62711221
Fix FetchArt tests
2015-01-06 21:42:10 +01:00
Bruno Cauet
1f0932968e
Simple test fixes
...
importfeeds, lastgenre
2015-01-06 21:42:10 +01:00
Bruno Cauet
8097ff8c1d
Convert fetchart plugin, with OO rewrite of sources
...
Art sources are now classes
2015-01-06 21:42:10 +01:00
Bruno Cauet
5c1cc6e7fc
Convert the convert plugin to the new logging system
2015-01-06 21:42:10 +01:00
Bruno Cauet
11d5f93db1
Convert importadded plugin
...
Many listeners. Everything is now a method
2015-01-06 21:42:10 +01:00
Bruno Cauet
63041736e3
Convert lyrics plugin, with OO rewrite of backends
2015-01-06 21:42:10 +01:00
Bruno Cauet
860e7e1483
Update 3 plugins: func → methods, listeners
...
- functions turn into method in order to have the logger object
- registering the listener has to be updated too
2015-01-06 21:42:09 +01:00
Bruno Cauet
203b325ee7
Convert mbsync logging: big funcs → methods
2015-01-06 21:42:09 +01:00
Bruno Cauet
74e18afa94
Convert bdp: pass around with static setter on classes
2015-01-06 21:42:09 +01:00
Bruno Cauet
32673b87e7
Update multiple plugins: pass the logger around
2015-01-06 21:42:09 +01:00
Bruno Cauet
7d58a38428
Convert replaygain: pass logger to other classes
...
This time the logger is passed to the other classes of the module, not
to functions.
2015-01-06 21:42:02 +01:00
Bruno Cauet
38352f7058
Update chroma plugin logging: pas logger around
...
The logger is passed as an argument to multiple function. This showcases
the second possibility for using the new logging system. Several similar
conversions to be expected.
2015-01-06 21:42:02 +01:00
Bruno Cauet
1be3dade04
Convert freedesktop plugin logging: func → method
...
This serves as an introduction for many plugin updates to come.
Multiple functions have to turn into methods -- and this is one of the
shortest plugins.
2015-01-06 21:40:58 +01:00
Bruno Cauet
e14a54df05
Convert multiple plugins' logger usage (easy ones)
...
Those plugins only called methods and no function, which eases the
conversion.
2015-01-06 21:34:13 +01:00
Bruno Cauet
0617c0410f
Remove log declarations where it was unused
...
Easiest conversions!
2015-01-06 21:34:12 +01:00
Bruno Cauet
78ac338c28
Delete _log definition where it was already used
...
Easy switch to the new logger
2015-01-06 21:27:16 +01:00
Bruno Cauet
1afe82fb41
Make 2 plugins rely on auto log level mgmt
...
ftintitle and title don't do manual management anymore.
2015-01-06 21:27:15 +01:00
Bruno Cauet
427f7e7035
Automatic logger level changes on import
...
Breaking changes: plugins should set set _import_stages instead of
import_stages. From outside the latter is replaced by import_stages().
This is because it is now wrapped with log level-getting & -setting
statements.
2015-01-06 21:27:15 +01:00
Bruno Cauet
d38d264b6b
Add BeetsPlugin._log: per-plugin logger
2015-01-06 21:27:08 +01:00
Adrian Sampson
0f1b5b2ca5
Changelog for #1207 ( fix #1205 )
2015-01-06 11:25:00 -08:00
Adrian Sampson
5add272916
Merge pull request #1207 from brunal/master
...
Don't crash when no argument is given
2015-01-06 11:24:28 -08:00
Adrian Sampson
b027e48c32
Changelog for #1206
2015-01-06 11:23:40 -08:00