From 3a8daea936433da4e991a8645e0e522b3abac1e1 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Sun, 6 Sep 2020 15:27:47 +0200 Subject: [PATCH] config example added --- config_example/config.py | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 config_example/config.py diff --git a/config_example/config.py b/config_example/config.py new file mode 100644 index 0000000..f731ba3 --- /dev/null +++ b/config_example/config.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# -*- coding: UTF-8 -*- + +import socket_protocol +import stringtools +import task +import tcp_socket + +FULL_SCRREN = False + + +# TCP-Server +# +server_out_secret = None # or set a secret to require client authentification: b'give_a_secret_string_here' +server_out_ip = '192.168.0.121' +server_out_port = 37000 +server_in_secret = None # or set a secret to require client authentification: b'give_a_secret_string_here' +server_in_ip = '192.168.0.120' +server_in_port = 37000 + +server_garage_secret = None # or set a secret to require client authentification: b'give_a_secret_string_here' +server_garage_ip = '192.168.0.13' +server_garage_port = 10000 +# Logging +# +LOGTARGET = 'stdout' # possible choices are: 'logfile' or 'stdout' +SHORT_FMT = "%(asctime)s: %(levelname)-7s - %(message)s" +""" A short formatter including the most important information""" +LONG_FMT = """~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +File "%(pathname)s", line %(lineno)d, in %(funcName)s +%(asctime)s: %(levelname)-7s - %(message)s""" +""" A long formatter which results in links to the source code inside Eclipse""" + +loggers = ( + ('APP', 'DEBUG'), + (socket_protocol.logger_name, 'WARNING'), + (stringtools.logger_name, 'WARNING'), + (task.logger_name, 'WARNING'), + (tcp_socket.logger_name, 'WARNING'), +) +formatter = LONG_FMT