~ubuntu-branches/ubuntu/trusty/python-apptools/trusty

« back to all changes in this revision

Viewing changes to apptools/logger/plugin/logger_preferences.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-07-08 23:55:50 UTC
  • mfrom: (2.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110708235550-yz5u79ubeo4dhyfx
Tags: 4.0.0-1
* New upstream release
* Update debian/watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import logging
 
2
 
 
3
from apptools.preferences.api import PreferencesHelper
 
4
from traits.api import Bool, Str, Trait
 
5
 
 
6
 
 
7
class LoggerPreferences(PreferencesHelper):
 
8
    """ The persistent service exposing the Logger plugin's API.
 
9
    """
 
10
 
 
11
    #### Preferences ###########################################################
 
12
 
 
13
    # The log levels
 
14
    level = Trait('Info',
 
15
        {'Debug'    : logging.DEBUG,
 
16
         'Info'     : logging.INFO,
 
17
         'Warning'  : logging.WARNING,
 
18
         'Error'    : logging.ERROR,
 
19
         'Critical' : logging.CRITICAL,
 
20
        },
 
21
        is_str = True,
 
22
    )
 
23
 
 
24
    enable_agent = Bool(False)
 
25
    smtp_server = Str()
 
26
    to_address = Str()
 
27
    from_address = Str()
 
28
 
 
29
    # The path to the preferences node that contains the preferences.
 
30
    preferences_path = Str('apptools.logger')