Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad Num Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str NameLoad Assign NameStore Dict Str Str Str NameLoad NameLoad NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Num Assign AttributeStore NameLoad attr BinOpMod BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str SubscriptLoad AttributeLoad NameLoad attr Slice NameLoad Assign NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpMod NameLoad BinOpAdd Num SubscriptLoad NameLoad Index NameLoad BinOpMod Str NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad orelse If CompareIn NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpMod NameLoad BinOpAdd Num SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad Return NameLoad orelse If CompareIn NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpMult Str Call NameLoad Num Call NameLoad NameLoad Str NameLoad Return NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad body Assign NameStore NameLoad TryExcept body Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad Dict Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Call AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body If Call NameLoad AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Pass orelse If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A Provides logging capabilities for applications in a Django environment.

Each application will have its own log file named "<app>.log".  In addition,
every log messsage will also be appended to "master.log".  These log files will
be located in the directory specified by the LOG_DIR Django setting.

If stdout is a tty, for example in the Django dev server, log messages will
also redirect to stdout using color coding for different levels.

Each application should get its own logger with the get_logger() function.  Here
is an example:

>>> import opus.lib.log
>>> log = opus.lib.log.get_logger("appname")
>>> log.debug("Debug Message here!")

This will put the message into two files: master.log and appname.log

This requires one to define a LOG_DIR setting in the Django settings.py. This
is the directory where the logs will be placed. Obviously the web server must
have write access to this directory.

 N/A logging N/A sys N/A os N/A os.path django.conf settings N/A N/A BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE N/A range 8 N/A RESET_SEQ [0m N/A COLOR_SEQ [1;%dm N/A BOLD_SEQ [1m N/A COLORIZE N/A DEBUG BLUE N/A HIGHLIGHT N/A CRITICAL ERROR WARNING RED RED YELLOW MyFormatter N/A N/A logging Formatter N/A N/A Used to format log messages all pretty like. __init__ N/A N/A self color N/A True N/A N/A N/A N/A N/A logging Formatter __init__ self %(fileandlineno)-31s:%(funcName)s:%(asctime)s %(levelname)-8s %(message)s %Y-%m-%d %H:%M:%S N/A N/A self use_color color N/A format N/A N/A self record N/A N/A N/A N/A record pid N/A N/A os getpid N/A N/A record fileandlineno N/A %s.%s:%s N/A N/A record name N/A record filename N/A record lineno N/A l 10 N/A N/A record funcName N/A N/A N/A %- N/A str l s N/A N/A record funcName N/A l N/A levelname N/A record levelname N/A N/A self use_color N/A N/A N/A levelname COLORIZE N/A N/A levelname_color N/A N/A N/A COLOR_SEQ N/A 30 N/A COLORIZE N/A levelname N/A %-8s levelname RESET_SEQ N/A N/A record levelname levelname_color N/A N/A N/A levelname HIGHLIGHT N/A N/A line N/A N/A N/A logging Formatter format self record N/A line N/A N/A N/A COLOR_SEQ N/A 40 N/A HIGHLIGHT N/A levelname line RESET_SEQ N/A line N/A N/A N/A levelname HIGHLIGHT N/A N/A line N/A N/A N/A logging Formatter format self record N/A line N/A N/A N/A * N/A min 79 N/A len line line N/A line N/A N/A N/A N/A logging Formatter format self record N/A N/A get_logger N/A N/A name N/A None N/A N/A Gets a logger for use by Opus. If you want your log entries to also go
    to a separate file, give a name. Otherwise, log messages go to the master
    log N/A opusroot N/A N/A logging getLogger opus N/A N/A N/A logdir N/A settings LOG_DIR N/A N/A N/A N/A AttributeError ImportError N/A N/A logdir None N/A N/A N/A loglevel N/A settings LOG_LEVEL N/A N/A N/A N/A AttributeError ImportError N/A N/A loglevel N/A logging DEBUG N/A N/A isinstance loglevel basestring N/A N/A loglevel N/A N/A DEBUG INFO WARNING ERROR CRITICAL N/A logging DEBUG N/A logging INFO N/A logging WARNING N/A logging ERROR N/A logging CRITICAL N/A N/A N/A loglevel upper N/A N/A N/A opusroot handlers N/A N/A N/A N/A opusroot setLevel loglevel N/A logdir N/A N/A masterlogfile N/A N/A N/A os path join logdir master.log N/A masterhandler N/A N/A logging FileHandler masterlogfile N/A N/A N/A masterhandler setFormatter N/A MyFormatter color False N/A N/A N/A opusroot addHandler masterhandler N/A N/A N/A N/A hasattr N/A sys stderr isatty N/A N/A istty N/A N/A N/A sys stderr isatty N/A N/A istty False N/A N/A N/A IOError N/A N/A N/A N/A istty N/A N/A colorstderr N/A N/A logging StreamHandler N/A N/A N/A colorstderr setFormatter N/A MyFormatter color True N/A N/A N/A opusroot addHandler colorstderr N/A N/A name N/A N/A opusroot N/A applogger N/A N/A logging getLogger N/A opus. name N/A N/A N/A applogger handlers N/A N/A N/A N/A applogger setLevel loglevel N/A logdir N/A N/A applogfile N/A N/A N/A os path join logdir N/A name .log N/A h N/A N/A logging FileHandler applogfile N/A N/A N/A h setFormatter N/A MyFormatter color False N/A N/A N/A applogger addHandler h N/A applogger N/A