@@ 106-122 (lines=17) @@ | ||
103 | ||
104 | # ------------------------------------------------------------------------------------------------------------------ |
|
105 | def __startup(self): |
|
106 | """ |
|
107 | Performs the necessary actions for starting up the logger. |
|
108 | """ |
|
109 | credentials = Credentials.get() |
|
110 | ||
111 | self.__log.info('Starting logger') |
|
112 | ||
113 | # Set the effective user and group to an unprivileged user and group. |
|
114 | self.__set_unprivileged_user() |
|
115 | ||
116 | # Set database configuration options. |
|
117 | DataLayer.config['host'] = credentials.get_host() |
|
118 | DataLayer.config['user'] = credentials.get_user() |
|
119 | DataLayer.config['password'] = credentials.get_password() |
|
120 | DataLayer.config['database'] = credentials.get_database() |
|
121 | DataLayer.config['port'] = credentials.get_port() |
|
122 | ||
123 | # ---------------------------------------------------------------------------------------------------------------------- |
|
124 |
@@ 21-32 (lines=12) @@ | ||
18 | # ------------------------------------------------------------------------------------------------------------------ |
|
19 | def __init__(self): |
|
20 | """ |
|
21 | Object constructor. |
|
22 | """ |
|
23 | credentials = Credentials.get() |
|
24 | ||
25 | DataLayer.config['host'] = credentials.get_host() |
|
26 | DataLayer.config['user'] = credentials.get_user() |
|
27 | DataLayer.config['password'] = credentials.get_password() |
|
28 | DataLayer.config['database'] = credentials.get_database() |
|
29 | DataLayer.config['port'] = credentials.get_port() |
|
30 | DataLayer.config['autocommit'] = False |
|
31 | ||
32 | # ------------------------------------------------------------------------------------------------------------------ |
|
33 | def main(self, filename): |
|
34 | """ |
|
35 | The main function of load_schedule. |