Open dutangp opened 2 years ago
Hi @dutangp, yes, you are right. -l
flag affects only script logs (not server.log), this is a bug
hey,
Just a suggestion, in docker at least, to be able to remove this server.log in file as all the log a shipped to stdout of the container and can be handled differently.
hello,
For info I found the way in docker by rebuilding the Dockerfile with ENTRYPOINT instead of CMD
ENTRYPOINT [ "python3", "launcher.py" ]
and modifying the file logging.json as below
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"simple": {
"format": "%(asctime)s [%(name)s.%(levelname)s] %(message)s"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"level": "DEBUG",
"formatter": "simple",
"stream": "ext://sys.stdout"
}
},
"loggers": {
},
"root": {
"level": "DEBUG",
"handlers": [
"console"
]
}
}
In docker server.log doesn't bring anything as logs can be handled via std out only and redirection to ES. As well the entrypoint can handle the parameters -d
, -l
, -t
.
@bugy no rush at all on fixing this point imho but you are the boss :)
Hi @dutangp, I would agree with you, that a standard logging mechanism in docker is stdout. However, someone can also mount script server log folder to a host folder, making them "persistent". It's needed for script execution logs anyway. For me, the proper fix would be to make it configurable via conf.json. For now I would keep existing behaviour as it is.
@dmarteau @dutangp i made a fix for it, could you test it please?
Hello,
Version tested 1.17.0 in docker
Running the application
output error
I guess there is a missing configuration in the
src/main.py
to setupserver.log
file in the directory taken from the arg.