Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
pip.log.Logger Class Reference
Inheritance diagram for pip.log.Logger:
_object

Public Member Functions

def __init__
 
def add_consumers
 
def debug
 
def info
 
def notify
 
def warn
 
def error
 
def fatal
 
def deprecated
 
def log
 
def start_progress
 
def end_progress
 
def show_progress
 
def stdout_level_matches
 
def level_matches
 
def level_for_integer
 
def move_stdout_to_stderr
 

Public Attributes

 consumers
 
 indent
 
 explicit_levels
 
 in_progress
 
 in_progress_hanging
 FIXME: should this be a name, not a level number? More...
 
 last_message
 

Static Public Attributes

int VERBOSE_DEBUG = logging.DEBUG-1
 
 DEBUG = logging.DEBUG
 
 INFO = logging.INFO
 
tuple NOTIFY = (logging.INFO + logging.WARN)
 
 WARN = logging.WARN
 
 ERROR = logging.ERROR
 
 FATAL = logging.FATAL
 
list LEVELS = [VERBOSE_DEBUG, DEBUG, INFO, NOTIFY, WARN, ERROR, FATAL]
 
dictionary COLORS
 

Private Member Functions

def _show_progress
 
def _stdout_level
 

Detailed Description

Logging object for use in command-line script.  Allows ranges of
levels, to avoid some redundancy of displayed information.

Constructor & Destructor Documentation

def pip.log.Logger.__init__ (   self)

Member Function Documentation

def pip.log.Logger._show_progress (   self)
private
Should we display download progress?
def pip.log.Logger._stdout_level (   self)
private
Returns the level that stdout runs at
def pip.log.Logger.add_consumers (   self,
  consumers 
)
def pip.log.Logger.debug (   self,
  msg,
  args,
  kw 
)
def pip.log.Logger.deprecated (   self,
  removal_version,
  msg,
  args,
  kwargs 
)
Logs deprecation message which is log level WARN if the
``removal_version`` is > 1 minor release away and log level ERROR
otherwise.

removal_version should be the version that the deprecated feature is
expected to be removed in, so something that will not exist in
version 1.7, but will in 1.6 would have a removal_version of 1.7.
def pip.log.Logger.end_progress (   self,
  msg = 'done.' 
)
def pip.log.Logger.error (   self,
  msg,
  args,
  kw 
)
def pip.log.Logger.fatal (   self,
  msg,
  args,
  kw 
)
def pip.log.Logger.info (   self,
  msg,
  args,
  kw 
)
def pip.log.Logger.level_for_integer (   cls,
  level 
)
def pip.log.Logger.level_matches (   self,
  level,
  consumer_level 
)
>>> l = Logger()
>>> l.level_matches(3, 4)
False
>>> l.level_matches(3, 2)
True
>>> l.level_matches(slice(None, 3), 3)
False
>>> l.level_matches(slice(None, 3), 2)
True
>>> l.level_matches(slice(1, 3), 1)
True
>>> l.level_matches(slice(2, 3), 1)
False
def pip.log.Logger.log (   self,
  level,
  msg,
  args,
  kw 
)
def pip.log.Logger.move_stdout_to_stderr (   self)
def pip.log.Logger.notify (   self,
  msg,
  args,
  kw 
)
def pip.log.Logger.show_progress (   self,
  message = None 
)
If we are in a progress scope, and no log messages have been
shown, write out another '.'
def pip.log.Logger.start_progress (   self,
  msg 
)
def pip.log.Logger.stdout_level_matches (   self,
  level 
)
Returns true if a message at this level will go to stdout
def pip.log.Logger.warn (   self,
  msg,
  args,
  kw 
)

Member Data Documentation

dictionary pip.log.Logger.COLORS
static
Initial value:
1 = {
2  WARN: _color_wrap(colorama.Fore.YELLOW),
3  ERROR: _color_wrap(colorama.Fore.RED),
4  FATAL: _color_wrap(colorama.Fore.RED),
5  }
pip.log.Logger.consumers
pip.log.Logger.DEBUG = logging.DEBUG
static
pip.log.Logger.ERROR = logging.ERROR
static
pip.log.Logger.explicit_levels
pip.log.Logger.FATAL = logging.FATAL
static
pip.log.Logger.in_progress
pip.log.Logger.in_progress_hanging

FIXME: should this be a name, not a level number?

pip.log.Logger.indent
pip.log.Logger.INFO = logging.INFO
static
pip.log.Logger.last_message
list pip.log.Logger.LEVELS = [VERBOSE_DEBUG, DEBUG, INFO, NOTIFY, WARN, ERROR, FATAL]
static
tuple pip.log.Logger.NOTIFY = (logging.INFO + logging.WARN)
static
int pip.log.Logger.VERBOSE_DEBUG = logging.DEBUG-1
static
pip.log.Logger.WARN = logging.WARN
static

The documentation for this class was generated from the following file:

Copyright 2014 Google Inc. All rights reserved.