mirror of
https://github.com/beetbox/beets.git
synced 2025-12-11 11:07:31 +01:00
Move log handler to beets.ui
This commit is contained in:
parent
5d753b4f38
commit
db7588021b
2 changed files with 6 additions and 8 deletions
|
|
@ -32,10 +32,11 @@ from beets.dbcore import types
|
|||
import beets
|
||||
|
||||
|
||||
log = logging.getLogger('beets')
|
||||
|
||||
|
||||
# Library-specific query types.
|
||||
|
||||
|
||||
class PathQuery(dbcore.FieldQuery):
|
||||
"""A query that matches all items under a given path."""
|
||||
def __init__(self, field, pattern, fast=True):
|
||||
|
|
@ -114,13 +115,6 @@ class PathType(types.Type):
|
|||
PF_KEY_DEFAULT = 'default'
|
||||
|
||||
|
||||
# Logger.
|
||||
log = logging.getLogger('beets')
|
||||
if not log.handlers:
|
||||
log.addHandler(logging.StreamHandler())
|
||||
log.propagate = False # Don't propagate to root handler.
|
||||
|
||||
|
||||
# A little SQL utility.
|
||||
def _orelse(exp1, exp2):
|
||||
"""Generates an SQLite expression that evaluates to exp1 if exp1 is
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ if sys.platform == 'win32':
|
|||
|
||||
|
||||
log = logging.getLogger('beets')
|
||||
if not log.handlers:
|
||||
log.addHandler(logging.StreamHandler())
|
||||
log.propagate = False # Don't propagate to root handler.
|
||||
|
||||
|
||||
PF_KEY_QUERIES = {
|
||||
'comp': 'comp:true',
|
||||
|
|
|
|||
Loading…
Reference in a new issue