summaryrefslogtreecommitdiffstats
path: root/pym/portage/emaint/modules/logs/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/emaint/modules/logs/__init__.py')
-rw-r--r--pym/portage/emaint/modules/logs/__init__.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/pym/portage/emaint/modules/logs/__init__.py b/pym/portage/emaint/modules/logs/__init__.py
new file mode 100644
index 000000000..005b608a6
--- /dev/null
+++ b/pym/portage/emaint/modules/logs/__init__.py
@@ -0,0 +1,51 @@
+# Copyright 2005-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+"""'This emaint module provides checks and maintenance for:
+Cleaning the PORT_LOGDIR logs
+"""
+
+
+module_spec = {
+ 'name': 'logs',
+ 'description': "Provides functions to scan, check and clean old logs " +\
+ "in the PORT_LOGDIR",
+ 'provides':{
+ 'module1': {
+ 'name': "logs",
+ 'class': "CleanLogs",
+ 'description': "Clean out old logs from the PORT_LOGDIR",
+ 'functions': ['check','clean'],
+ 'func_desc': {
+ 'clean': {
+ "short": "-C", "long": "--clean",
+ "help": "Cleans out logs more than 7 days old (cleanlogs only)" + \
+ " modulke-options: -t, -p",
+ 'status': "Cleaning %s",
+ 'func': 'clean'
+ },
+ 'time': {
+ "short": "-t", "long": "--time",
+ "help": "(cleanlogs only): -t, --time Delete logs older than NUM of days",
+ 'status': "",
+ 'action': 'store',
+ 'type': 'int',
+ 'dest': 'NUM',
+ 'callback': None,
+ 'callback_kwargs': None,
+ 'func': 'clean'
+ },
+ 'pretend': {
+ "short": "-p", "long": "--pretend",
+ "help": "(cleanlogs only): -p, --pretend Output logs that would be deleted",
+ 'status': "",
+ 'action': 'store_true',
+ 'dest': 'pretend',
+ 'callback': None,
+ 'callback_kwargs': None,
+ 'func': 'clean'
+ }
+ }
+ }
+ }
+ }