98a30fe3c228cec48e68f3feaa28f3ddb93e8fc3
[cs-p2p-next.git] / ppf / new / config.py
1 """
2 Configuration class for P2P logging information.
3
4 2011, Mariana Marasoiu, mariana.marasoiu@gmail.com
5 """
6
7 import os
8 import os.path
9 import logging
10
11 #
12 # Logging code heavily inspired by Logging HOWTO documentation:
13 #     http://docs.python.org/dev/howto/logging.html#configuring-logging
14 #
15
16 # Create logger; default logging level is DEBUG.
17 logger = logging.getLogger(__name__)
18 logger.setLevel(logging.DEBUG)
19
20 # Create console handler and set level to ERROR.
21 ch = logging.StreamHandler()
22 ch.setLevel(logging.DEBUG)
23
24 # Create formatter.
25 formatter = logging.Formatter('%(filename)s:%(lineno)s - %(levelname)s: %(message)s')
26
27 # Add formatter to console handler.
28 ch.setFormatter(formatter)
29
30 # Add console handler to logger.
31 logger.addHandler(ch)
32
33
34 class SwarmConfig(object):
35     def __init__(self):
36         pass
37
38     def load(self, ini_file):
39         pass
40
41     def store(self, ini_file):
42         pass
43         
44     def add(self, section, option, value):
45         pass
46
47     def get(self, section):
48         pass
49
50     def set(self, section, option, value):
51         pass
52
53 class SessionConfig(object):
54     def __init__(self):
55         pass
56
57     def load(self, ini_file):
58         pass
59
60     def store(self, ini_file):
61         pass
62         
63     def add(self, section, option, value):
64         pass
65
66     def get(self, section):
67         pass
68
69     def set(self, section, option, value):
70         pass
71
72 class AccessConfig(object):
73     def __init__(self):
74         pass
75
76     def load(self, ini_file):
77         pass
78
79     def store(self, ini_file):
80         pass
81         
82     def add(self, section, option, value):
83         pass
84
85     def get(self, section):
86         pass
87
88     def set(self, section, option, value):
89         pass
90