mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
remove script installed by pubsublogger
This commit is contained in:
parent
935e51c961
commit
5b17d416c8
2 changed files with 2 additions and 47 deletions
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
Loading…
Reference in a new issue