Skip to content
Snippets Groups Projects
Commit 2e96b653 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Story SW-300: fixing logfile

parent bf877494
No related branches found
No related tags found
2 merge requests!89Monitoring maintenance Epic branch merge,!1Resolve OSB-13 "Monitoringmaintenance "
......@@ -96,15 +96,15 @@ LOGGING = {
},
'loggers': {
'station_test.parser': {
'handlers': ['log_file'],
'handlers': ['console'],
'level': 'DEBUG',
},
'views': {
'handlers': ['log_file', 'console'],
'handlers': ['console'],
'level': 'DEBUG',
},
'serializers': {
'handlers': ['log_file', 'console'],
'handlers': ['console'],
'level': 'DEBUG',
},
......
import logging
import argparse
import fabric
from fabric.transfer import Transfer
from fabric.connection import Connection
import requests
import sys
import json
......@@ -22,13 +23,27 @@ def setup_argument_parser():
parser.add_argument('-u', '--user', help='username', default=False)
parser.add_argument('--address', help='address of the server. default [localhost]:8000',
default='lofarmonitortest.control.lofar')
parser.add_argument('--address', help='address of the server. default [localhost]:8000',
default='lofarmonitortest.control.lofar')
parser.add_argument('remote_install_path', help='remote path where to install the code')
parser.add_argument('--remote_install_path', help='remote path where to install the code',
default='deploy/test')
return parser
def installing_files(local_root_path, remote_root_path, address):
"""
Copies the django installation to the remote path
:param local_root_path: path to the local directory containing the files
:param remote_root_path: remote path where to install the files
:return:
"""
with Connection(address) as connection:
transfer = Transfer(connection)
transfer.put(local_root_path, remote_root_path)
def parse_arguments(parser):
return parser.parse_args()
......@@ -36,4 +51,4 @@ if __name__=='__main__':
logging.basicConfig(format="%(asctime)s %(levelname)s: %(message)s",level=logging.DEBUG)
parser = setup_argument_parser()
args = parse_arguments(parser)
installing_files(args.path, args.remote_install_path, args.address)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment