osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
201 stars 125 forks source link

Add tail to make logs #605

Closed minisbett closed 4 months ago

minisbett commented 4 months ago

Describe your changes

The current make logs command causes it to print out the whole log since container start, which feels very awful to use. Adding --tail 1 causes it to start all the way at the bottom, which I think is preferred.

Checklist

tsunyoku commented 4 months ago

meh, pure opinion and/or intention at this point -- i often like to have atleast some history of prior logs if i'm observing stability. i think make will allow you to pass parameters after the action and it gets passed to what it executes? that would be the best way to handle this

NiceAesth commented 4 months ago

--follow would probably be a better default

minisbett commented 4 months ago

meh, this is pure opinion at this point -- i often like to have atleast some history of prior logs. i think make lets you pass parameters after the action and it gets passed to what it executes? that would be the best way to handle this

make unfortunately doesn't, afaik it's awful in terms of argument parsing. You could do smth like make logs last=100 for example I think but directly specifying it like make logs 100 doesn't work.

If my bpy runs over a day I need to wait many minutes for the logs to reach the bottom, therefore the current command is pretty much unusable.

minisbett commented 4 months ago

--follow would probably be a better default

This is the current behavior. But as I said before, it makes the command pretty useless if u need to wait literal minutes until u see somewhat recent logs.

tsunyoku commented 4 months ago

You could do smth like make logs last=100 for example I think but directly specifying it like make logs 100 doesn't work.

last=100 is fine. better than nothing. certainly better than defining my behaviour for me