Commit 793cf137 by arun.uday

v6

parent 47ab9e24
......@@ -4,17 +4,11 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="530f9a40-4e97-41f4-9693-adc3b4faba7d" name="Changes" comment="v4">
<change afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/scripts/core/handlers/connect_mqtt_receive.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/scripts/core/handlers/connect_topic.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/scripts/core/handlers/message_read.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/scripts/logging/loggers.py" afterDir="false" />
<list default="true" id="530f9a40-4e97-41f4-9693-adc3b4faba7d" name="Changes" comment="v5">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/conf/application.conf" beforeDir="false" afterPath="$PROJECT_DIR$/conf/application.conf" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/config/applications_config.py" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/config/applications_config.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/services/receiver_app_run.py" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/services/receiver_app_run.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/logging/loggers.py" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/logging/loggers.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -115,7 +109,14 @@
<option name="project" value="LOCAL" />
<updated>1675663187416</updated>
</task>
<option name="localTasksCounter" value="5" />
<task id="LOCAL-00005" summary="v5">
<created>1675678118346</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1675678118346</updated>
</task>
<option name="localTasksCounter" value="6" />
<servers />
</component>
<component name="VcsManagerConfiguration">
......@@ -123,6 +124,7 @@
<MESSAGE value="v2" />
<MESSAGE value="v3" />
<MESSAGE value="v4" />
<option name="LAST_COMMIT_MESSAGE" value="v4" />
<MESSAGE value="v5" />
<option name="LAST_COMMIT_MESSAGE" value="v5" />
</component>
</project>
\ No newline at end of file
......@@ -12,7 +12,6 @@ requests = 60
[uvicorn]
uvicorn_host = 127.0.0.1
uvicorn_port = 8001
uvicorn_app = scripts.services.receiver_app_run:app
# database servers
[connection]
......@@ -28,3 +27,6 @@ encode = utf-8
[api_routes]
index_route = /
[log]
formatter_time = asctime
formatter_level = levelname
......@@ -10,6 +10,9 @@ base_path = config.get("path", 'base_path')
sub_path = config.get("path", "sub_path")
log_path = config.get("path", "log_path")
# log
formatter_time = config.get("log", "formatter_time")
formatter_level = config.get("log", "formatter_level")
# mqtt
topic_name = config.get("mqtt", "topic")
......@@ -24,7 +27,6 @@ client_connect = config.get("connection", "mongodb")
# uvicorn
uvicorn_host = config.get("uvicorn", "uvicorn_host")
uvicorn_port = config.get("uvicorn", "uvicorn_port")
uvicorn_app = config.get("uvicorn", "uvicorn_app")
# redis
redis_host = config.get("redis_db", "redis_host")
......
......@@ -3,6 +3,7 @@ import os
from logging.handlers import RotatingFileHandler
from scripts.config import applications_config
from scripts.config.applications_config import formatter_time, formatter_level
def get_logger():
......@@ -11,7 +12,7 @@ def get_logger():
"""
__logger__ = logging.getLogger('')
__logger__.setLevel(logging.INFO)
log_formatter = '%(asctime)s - %(levelname)-6s - %(message)s'
log_formatter = f'%({formatter_time})s - %({formatter_level})-6s - %(message)s'
time_format = "%Y-%m-%d %H:%M:%S"
file_path = applications_config.base_path + applications_config.sub_path + applications_config.log_path
formatter = logging.Formatter(log_formatter, time_format)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment