Skip to content
Snippets Groups Projects
Commit 4abf26e2 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-833: testing and logging

parent 2925ae11
No related branches found
No related tags found
1 merge request!77SW-834: Resolve SW-834
...@@ -16,11 +16,11 @@ from lofar.common.lcu_utils import translate_user_station_string_into_station_li ...@@ -16,11 +16,11 @@ from lofar.common.lcu_utils import translate_user_station_string_into_station_li
def restart_tbb_recording(stations): def restart_tbb_recording(stations):
logging.info("Restarting TBB recording")
stations = translate_user_station_string_into_station_list(stations) stations = translate_user_station_string_into_station_list(stations)
station_hostname_csv_string = ','.join(stationname2hostname(s) for s in stations) station_hostname_csv_string = ','.join(stationname2hostname(s) for s in stations)
logging.info("Restarting TBB recording on stations %s", stations)
relay = lcurun_command + [station_hostname_csv_string] relay = lcurun_command + [station_hostname_csv_string]
cmd = relay + [tbb_command, "--record"] cmd = relay + [tbb_command, "--record"]
logging.info("Executing %s" % " ".join(cmd)) logging.info("Executing %s" % " ".join(cmd))
...@@ -35,3 +35,7 @@ def parse_args(): ...@@ -35,3 +35,7 @@ def parse_args():
def main(): def main():
args = parse_args() args = parse_args()
restart_tbb_recording(args.stations) restart_tbb_recording(args.stations)
if __name__ == '__main__':
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO)
main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment