From 5b17d416c82d6c7e565f679924485b4e569beec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 13 Aug 2014 11:55:59 +0200 Subject: [PATCH] remove script installed by pubsublogger --- bin/LAUNCH.sh | 4 ++-- bin/log_subscriber | 45 --------------------------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) delete mode 100755 bin/log_subscriber diff --git a/bin/LAUNCH.sh b/bin/LAUNCH.sh index 53a5dc59..0d71248f 100755 --- a/bin/LAUNCH.sh +++ b/bin/LAUNCH.sh @@ -78,9 +78,9 @@ function launching_logs { screen -dmS "Logging" sleep 0.1 echo -e $GREEN"\t* Launching logging process"$DEFAULT - screen -S "Logging" -X screen -t "LogQueue" bash -c './log_subscriber -p 6380 -c Queuing -l ../logs/; read x' + screen -S "Logging" -X screen -t "LogQueue" bash -c 'log_subscriber -p 6380 -c Queuing -l ../logs/; read x' sleep 0.1 - screen -S "Logging" -X screen -t "LogScript" bash -c './log_subscriber -p 6380 -c Script -l ../logs/; read x' + screen -S "Logging" -X screen -t "LogScript" bash -c 'log_subscriber -p 6380 -c Script -l ../logs/; read x' } function launching_queues { diff --git a/bin/log_subscriber b/bin/log_subscriber deleted file mode 100755 index 1d9c7413..00000000 --- a/bin/log_subscriber +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -import argparse -import signal -from pubsublogger import subscriber - - -def signal_handler(signal, frame): - if subscriber.pubsub is not None: - subscriber.stop() - print "Subscriber closed." - -signal.signal(signal.SIGINT, signal_handler) - -if __name__ == '__main__': - - parser = argparse.ArgumentParser(description='Configure a logging subscriber.') - - parser.add_argument("-H", "--hostname", default='localhost', - type=str, help='Set the hostname of the server.') - parser.add_argument("-p", "--port", default=6379, - type=int, help='Set the server port.') - parser.add_argument('-s', '--use_unix_socket', action='store_true', - help='Use a unix socket path instead of a tcp socket.') - parser.add_argument("--unix_socket_path", default='/tmp/redis.sock', - type=str, help='Unix socket path.') - parser.add_argument("-c", "--channel", - type=str, required=True, help='Channel to subscribe to.') - parser.add_argument("-l", "--log_path", - required=True, help='Path where the logs will be written') - parser.add_argument("-d", "--debug", action="store_true", - help='Also log debug messages.') - parser.add_argument("-m", "--mail", type=file, default=None, - help='Path to the config file used to send errors by email.') - - args = parser.parse_args() - - if args.use_unix_socket: - subscriber.unix_socket = args.unix_socket_path - else: - subscriber.hostname = args.hostname - subscriber.port = args.port - subscriber.run(args.channel, args.log_path, args.debug, args.mail) -