You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I want to format logs I face error[Appendix A] telling that concatenate of str and bytes is impossible, but it works when I remove parameter: formatter=text in my log.ini file[Appendix B]
Appendix A | traceback
"Waiting for application startup."
--- Logging error ---
Traceback (most recent call last):
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/logging/handlers.py", line 673, in emit
s = self.makePickle(record)
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/site-packages/logstash/handler_tcp.py", line 25, in makePickle
return self.formatter.format(record) + b'\n'
TypeError: can only concatenate str (not "bytes") to str
Call stack:
File "<string>", line 1, in <module>
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/multiprocessing/spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/site-packages/uvicorn/subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete
self.run_forever()
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/asyncio/base_events.py", line 600, in run_forever
self._run_once()
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once
handle._run()
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/site-packages/uvicorn/server.py", line 77, in serve
await self.startup(sockets=sockets)
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/site-packages/uvicorn/server.py", line 88, in startup
await self.lifespan.startup()
File "/home/atmosphere/miniconda3/envs/research_elastic_search/lib/python3.10/site-packages/uvicorn/lifespan/on.py", line 45, in startup
self.logger.info("Waiting for application startup.")
About
When I want to format logs I face error[Appendix A] telling that concatenate of str and bytes is impossible, but it works when I remove parameter:
formatter=text
in my log.ini file[Appendix B]Appendix A | traceback
Appendix B |
log.ini
config fileThe text was updated successfully, but these errors were encountered: