-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
common : reimplement logging #9418
Conversation
Please don't take away the optional JSON formatting for logs. |
@bviksoe The server logs were never meant to be used in such way. These messages can be disabled and changed (even when in JSON format) without notice and therefore 3rd-party code should never rely on them. Instead, your frontend can query the server through the available endpoints. If you have a specific functionality in mind that is currently missing, submit a feature request and it will get implemented. Model loading and server status can already be queried properly through the existing API. |
Thanks. I understand your desire to clean up and streamline the various parts of the project. |
If you provide sample |
Prior to this, it was possible to use --log-disable to stop llama-cli from printing all model loading debug logs. It would only print the prompt loaded with -p flag and of course model output + user input when in interactive mode. Now this is broken, it doesn't print the prompt and the model output. As far as I can see the verbosity options are not implemented completely yet to be able to facilitate the old behavior. I hope with gets fixed in the future, as right now it only works if --log-disable is removed. But that will make it dump everything instead of just the prompt. Also, --log-enable was removed, which was useful too, but my guess is once the verbosity level settings work as expected this will cover that aspect. |
All messages with non-zero log level are output to |
Hi Georgi, Also, even if you redirect to stderr, it doesn't remove everything. For example, you still have this message: Kind Regards, |
@ggerganov , I noticed the same thing. --log-disable now breaks conversation mode |
Don't use |
Now instead of --log-disable we need to redirect to stderr: ggerganov/llama.cpp#9418 Signed-off-by: Eric Curtin <[email protected]>
Now instead of --log-disable we need to redirect to stderr: ggerganov/llama.cpp#9418 Signed-off-by: Eric Curtin <[email protected]>
Now instead of --log-disable we need to redirect stderr to /dev/null: ggerganov/llama.cpp#9418 Signed-off-by: Eric Curtin <[email protected]>
Now instead of --log-disable we need to redirect stderr to /dev/null: ggerganov/llama.cpp#9418 Signed-off-by: Eric Curtin <[email protected]>
Now instead of --log-disable we need to redirect stderr to /dev/null: ggerganov/llama.cpp#9418 Signed-off-by: Eric Curtin <[email protected]>
Now instead of --log-disable we need to redirect stderr to /dev/null: ggerganov/llama.cpp#9418 Signed-off-by: Eric Curtin <[email protected]>
ref #8566
Merge ETA: Sep 15
Overhaul
common/log.h
. The main goal is to offload print IO to a separate thread in order to not affect the performance of the examples. Also add convenience options for timestamps, colors based on the log type and output to file.By default, the logs should look the same as they do on
master
.Adding the following options will make them look like this:
Another important change is that the logs in
llama-server
have been significantly reformatted. I've always had trouble reading the output, so I changed the text in a way that is IMO easier to read. Also removed the option to output json logs as I don't think it has any practical value.