aboutsummaryrefslogtreecommitdiff
blob: 0407efe2bef19f2f815c53790e1ea790366b9967 (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
# Copyright 2005-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

"""Check and clean old logs in the PORT_LOGDIR.
"""


module_spec = {
	'name': 'logs',
	'description': __doc__,
	'provides':{
		'module1': {
			'name': "logs",
			'class': "CleanLogs",
			'description': __doc__,
			'functions': ['check','clean'],
			'func_desc': {
				'clean': {
					"short": "-C", "long": "--clean",
					"help": "Cleans out logs more than 7 days old (cleanlogs only)" + \
								 "   module-options: -t, -p",
					'status': "Cleaning %s",
					'action': 'store_true',
					'func': 'clean',
					},
				'time': {
					"short": "-t", "long": "--time",
					"help": "(cleanlogs only): -t, --time   Delete logs older than NUM of days",
					'status': "",
					'type': int,
					'dest': 'NUM',
					'func': 'clean'
					},
				'pretend': {
					"short": "-p", "long": "--pretend",
					"help": "(cleanlogs only): -p, --pretend   Output logs that would be deleted",
					'status': "",
					'action': 'store_true',
					'dest': 'pretend',
					'func': 'clean'
					}
				}
			}
		}
	}