commit 09af1e024faf3e1a9c72479404f6e1e7f95f4208
Author: Konstantin Ryabitsev <icon(a)mricon.com>
Date: Sun Jan 19 01:17:53 2003 +0000
Support for -c option
epylog | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/epylog b/epylog
index f7806e4..5e2ae37 100755
--- a/epylog
+++ b/epylog
@@ -61,9 +61,10 @@ def usage():
def main(args):
debuglvl = 1
store_offsets = 0
+ config_file = '/etc/epylog/epylog.conf'
cmdargs = args[1:]
try:
- gopts, cmds = getopt.getopt(cmdargs, 'd:',
+ gopts, cmds = getopt.getopt(cmdargs, 'd:c:',
['quiet', 'store-offsets'])
for o,a in gopts:
if o == '-d':
@@ -72,13 +73,15 @@ def main(args):
debuglvl = 0
elif o == '--store-offsets':
store_offsets = 1
+ elif o == '-c':
+ config_file = a
except getopt.error, e:
print 'Error: %s' % e
logger = Logger(debuglvl)
logger.puthang(1, 'Initializing epylog')
try:
- epylog = Epylog('etc/epylog.conf', logger)
+ epylog = Epylog(config_file, logger)
except (ConfigError, ModuleSanityError), e:
logger.put(0, "Error returned: %s" % e)
sys.exit(1)