Tool for viewing logs developers' log console - listen on specified port and displays logs
Don't care anymore for setup many logfiles.
Supported protocols:
HttpGet
- prefferedJsonPost
Test-it:
- GET
curl http://localhost:8080?logger=LOGR&level=DEBUG&message=Hello&time=12:12&app=APP1
- POST
curl -X POST -H "Content-Type: application/json" -d @POST_example http://localhost:8080
- ab
ab -c5 -n 10000 http://localhost:8080/\?logger\=LOGR\&level\=DEBUG\&message\=Hello\&time\=12:12\&app\=APP1
Currently, I'm preparing some packaging...
python main.py
NLog config:
<target type='WebService'
name='pat'
url='http://localhost:8080'
protocol='HttpGet'
encoding='UTF-8'>
<!-- MAGIC_FIELD is resolved via affiliation -->
<parameter name="MAGIC_FIELD" type="System.String" layout="APP1"/>
<parameter name="message" type="System.String" layout="${message}"/>
<parameter name="logger" type="System.String" layout="${logger}"/>
<parameter name="level" type="System.String" layout="${level}"/>
<parameter name="time" type="System.DateTime" layout="${time}"/>
</target>
- HttpReader (GET/POST) -> LogRecord
- Write LogRecord to all writers
- File writer can assign file by
MAGIC_FIELD
python -m venv ~/.virtualenvs/logr
source ~/.virtualenvs/logr/bin/activate
pip install termcolor
pip install aiohttp
pip install PyYAML
# or via requirements.txt
Pavel Prchal, 2023