emaint: remove callback usage
[portage.git] / pym / portage / emaint / modules / logs / __init__.py
1 # Copyright 2005-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 """Check and clean old logs in the PORT_LOGDIR.
5 """
6
7
8 module_spec = {
9         'name': 'logs',
10         'description': __doc__,
11         'provides':{
12                 'module1': {
13                         'name': "logs",
14                         'class': "CleanLogs",
15                         'description': __doc__,
16                         'functions': ['check','clean'],
17                         'func_desc': {
18                                 'clean': {
19                                         "short": "-C", "long": "--clean",
20                                         "help": "Cleans out logs more than 7 days old (cleanlogs only)" + \
21                                                                  "   module-options: -t, -p",
22                                         'status': "Cleaning %s",
23                                         'action': 'store_true',
24                                         'func': 'clean',
25                                         },
26                                 'time': {
27                                         "short": "-t", "long": "--time",
28                                         "help": "(cleanlogs only): -t, --time   Delete logs older than NUM of days",
29                                         'status': "",
30                                         'type': 'int',
31                                         'dest': 'NUM',
32                                         'func': 'clean'
33                                         },
34                                 'pretend': {
35                                         "short": "-p", "long": "--pretend",
36                                         "help": "(cleanlogs only): -p, --pretend   Output logs that would be deleted",
37                                         'status': "",
38                                         'action': 'store_true',
39                                         'dest': 'pretend',
40                                         'func': 'clean'
41                                         }
42                                 }
43                         }
44                 }
45         }