summaryrefslogtreecommitdiff
path: root/src/loggers.h
blob: a1ee10a2ea1b386ca74acf1d0099eea21de6d006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
/** \file loggers.h    -*-c++-*- */

//   Copyright (C) 2009-2010 Daniel Burrows
//
//   This program is free software; you can redistribute it and/or
//   modify it under the terms of the GNU General Public License as
//   published by the Free Software Foundation; either version 2 of
//   the License, or (at your option) any later version.
//
//   This program is distributed in the hope that it will be useful,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//   General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program; see the file COPYING.  If not, write to
//   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
//   Boston, MA 02111-1307, USA.


#ifndef LOGGERS_H
#define LOGGERS_H

#include <generic/util/logging.h>

namespace logging = aptitude::util::logging;

namespace aptitude
{
  /** \brief A global repository for the loggers used in aptitude.
   *  The sole purpose of this file is to keep that information in one
   *  place.
   *
   *  It would be nicer if we could enforce that somehow.
   */
  class Loggers
  {
    // Could define static variables here, but that would have no real purpose.
  public:
    /** \brief The logger for events having to do with aptitude's
     *  global apt state.
     *
     *  Name: aptitude.apt.globals
     */
    static logging::LoggerPtr getAptitudeAptGlobals();

    /** \brief The logger for events having to do with aptitude's
     *  wrapper around the apt cache.
     *
     *  Name: aptitude.apt.cache
     */
    static logging::LoggerPtr getAptitudeAptCache();

    /** \brief The logger for events having to do with aptitude's
     *  backend changelog download code.
     *
     *  Name: aptitude.changelog
     */
    static logging::LoggerPtr getAptitudeChangelog();

    /** \brief The logger for events having to do with aptitude's
     *  backend changelog parser.
     *
     *  Name: aptitude.changelog.parse
     */
    static logging::LoggerPtr getAptitudeChangelogParse();

    /** \brief The logger for events having to do with command-line
     *  actions.
     *
     *  Includes both parsing and logic.
     *
     *  Name: aptitude.cmdline
     */
    static logging::LoggerPtr getAptitudeCmdline();

    /** \brief The logger for events having to do with the "search"
     *  command-line action.
     *
     *  Name: aptitude.cmdline.search
     */
    static logging::LoggerPtr getAptitudeCmdlineSearch();

    /** \brief The logger for events having to do with the progress
     *  display throttler in aptitude's command-line code.
     */
    static logging::LoggerPtr getAptitudeCmdlineThrottle();

    /** \brief The logger for events having to do with aptitude's
     *  caching of downloaded data (other than package lists and
     *  .debs).
     */
    static logging::LoggerPtr getAptitudeDownloadCache();

    /** \brief The logger for events having to do with aptitude's
     *  background download queue.
     */
    static logging::LoggerPtr getAptitudeDownloadQueue();

    /** \brief The logger for events having to do with how aptitude's
     *  background download queue checks the download cache.
     */
    static logging::LoggerPtr getAptitudeDownloadQueueCache();

    /** \brief The logger for events having to do with the dpkg
     *  status pipe.
     */
    static logging::LoggerPtr getAptitudeDpkgStatusPipe();

    /** \brief The logger for events having to do with the dpkg
     *  terminal in the GTK+ frontend.
     */
    static logging::LoggerPtr getAptitudeDpkgTerminal();

    /** \brief The logger for events having to do with the dpkg
     *  terminal and subprocess activity/inactivity in the GTK+
     *  frontend.
     */
    static logging::LoggerPtr getAptitudeDpkgTerminalInactivity();

    /** \brief The logger for the GUI dashboard tab's upgrade
     *         resolver.
     *
     *  Name: aptitude.gtk.dashboard.upgrade.resolver
     */
    static logging::LoggerPtr getAptitudeGtkDashboardUpgradeResolver();

    /** \brief The logger for GUI changelog handling.
     *
     *  Name: aptitude.gtk.changelog
     */
    static logging::LoggerPtr getAptitudeGtkChangelog();

    /** \brief The logger for the GUI changelog cache thread.
     *
     *  Name: aptitude.gtk.changelog.cache
     */
    static logging::LoggerPtr getAptitudeGtkChangelogCache();

    /** \brief The logger for the GUI changelog parse thread.
     *
     *  Name: aptitude.gtk.changelog.parse
     */
    static logging::LoggerPtr getAptitudeGtkChangelogParse();

    /** \brief The logger for the module of globals.
     *
     *  Name: aptitude.gtk.globals
     */
    static logging::LoggerPtr getAptitudeGtkGlobals();

    /** \brief The logger for the GTK+ main window.
     *
     *  Name: aptitude.gtk.mainwindow
     */
    static logging::LoggerPtr getAptitudeGtkMainWindow();

    /** \brief The logger for the GUI package view (PkgView).
     *
     *  Name: aptitude.gtk.pkgview
     */
    static logging::LoggerPtr getAptitudeGtkPkgView();

    /** \brief The logger for the GUI resolver tab.
     *
     *  Name: aptitude.gtk.resolver
     */
    static logging::LoggerPtr getAptitudeGtkResolver();

    /** \brief The logger for events related to the screenshot cache
     *  in the GUI.
     *
     *  Name: aptitude.gtk.screenshot.cache
     */
    static logging::LoggerPtr getAptitudeGtkScreenshotCache();

    /** \brief The logger for events related to the screenshot image
     *  object in the GUI.
     *
     *  Name: aptitude.gtk.screenshot.image
     */
    static logging::LoggerPtr getAptitudeGtkScreenshotImage();

    /** \brief The logger for events related to GUI tabs.
     *
     *  Name: aptitude.gtk.tabs
     */
    static logging::LoggerPtr getAptitudeGtkTabs();

    /** \brief The logger for events related to the top-level GTK+ UI.
     *
     *  Name: aptitude.gtk.toplevel
     */
    static logging::LoggerPtr getAptitudeGtkToplevel();

    /** \brief The logger for events related to a collection of tabs
     *  in the top-level GTK+ UI.
     *
     *  Name: aptitude.gtk.toplevel.tabs
     */
    static logging::LoggerPtr getAptitudeGtkToplevelTabs();

    /** \brief The logger for the dependency resolver.
     *
     *  Name: aptitude.resolver
     */
    static logging::LoggerPtr getAptitudeResolver();

    /** \brief The logger for the resolver cost settings.
     *
     *  Name: aptitude.resolver.costs
     */
    static logging::LoggerPtr getAptitudeResolverCosts();

    /** \brief The logger for resolver hints.
     *
     *  Name: aptitude.resolver.hints
     */
    static logging::LoggerPtr getAptitudeResolverHints();

    /** \brief The logger for comparing resolver hints.
     *
     *  Name: aptitude.resolver.hints.compare
     */
    static logging::LoggerPtr getAptitudeResolverHintsCompare();

    /** \brief The logger for matching resolver hints against
     * packages.
     *
     *  Name: aptitude.resolver.hints.match
     */
    static logging::LoggerPtr getAptitudeResolverHintsMatch();

    /** \brief The logger for parsing resolver hints.
     *
     *  Name: aptitude.resolver.hints.parse
     */
    static logging::LoggerPtr getAptitudeResolverHintsParse();

    /** \brief The logger for describing which packages are initially
     *  considered "manual".
     *
     *  Name: aptitude.resolver.initialManualFlags
     */
    static logging::LoggerPtr getAptitudeResolverInitialManualFlags();

    /** \brief The logger for the "upgrade/install only" logic in the
     *  dependency resolver.
     *
     *  Name: aptitude.resolver.safeResolver
     */
    static logging::LoggerPtr getAptitudeResolverSafeResolver();

    /** \brief The logger for the setup routine for the safe resolver
     * logic.
     *
     *  Name: aptitude.resolver.safeResolver.setup
     */
    static logging::LoggerPtr getAptitudeResolverSafeResolverSetup();

    /** \brief The logger for setting up scores for the dependency
     *  resolver.
     *
     *  Name: aptitude.resolver.scores
     */
    static logging::LoggerPtr getAptitudeResolverScores();

    /** \brief The logger for the resolver's search logic.
     *
     *  Name: aptitude.resolver.search
     */
    static logging::LoggerPtr getAptitudeResolverSearch();

    /** \brief The logger for the resolver's search-graph maintenance.
     */
    static logging::LoggerPtr getAptitudeResolverSearchGraph();

    /** \brief The logger for the cost component of the resolver's
     *  search logic.
     *
     *  Name: aptitude.resolver.search.costs
     */
    static logging::LoggerPtr getAptitudeResolverSearchCosts();

    /** \brief The logger for events related to setting up and running
     *  the background resolver thread.
     */
    static logging::LoggerPtr getAptitudeResolverThread();

    /** \brief The logger for messages related to temporary files. */
    static logging::LoggerPtr getAptitudeTemp();

    /** \brief The logger for the "why" command.
     *
     *  Name: aptitude.why
     */
    static logging::LoggerPtr getAptitudeWhy();

    /** \brief The logger for the GTK+ interface to the "why" command.
     *
     *  Name: aptitude.why
     */
    static logging::LoggerPtr getAptitudeWhyGtk();
  };
}

#endif // LOGGERS_H