pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.33k stars 1.55k forks source link

Add save container output to file #4550

Open deff-dev opened 1 year ago

deff-dev commented 1 year ago

Is there an existing feature request for this?

Describe the feature you would like to see.

I want to add save container output to file, it's feature that will help people when server restated/crashed. They always can check old logs and understand why the server crashed, etc...

Describe the solution you'd like.

After every run/stop, panel saving file with container console output, example file name: output_2022-11-11-04:01:35.log (output_date_time.log)

Additional context to this request.

No response

notAreYouScared commented 1 year ago

Most things save a log already. What are you running that doesn't save logs on error/crash

deff-dev commented 1 year ago

My idea is to save console logs (output container). For example now at CS:GO I don't understand why crashed server, because don't have last game console logs. And if I want to check yesterday logs (for example game chat at specific time), I can't do it because they don't exist (don't saved). CS:GO have parameter "-condebug" at start line, and implement the feature I need through it, but not every game have it. Now my entrypoint.sh looks like that: image

It's feature exists at LGSM and I know I can add ">> file.log" to file, but think it's not quite right

ItzDerock commented 8 months ago

Most things save a log already. What are you running that doesn't save logs on error/crash

PaperMC. I've had numerous crashes where nothing is logged at all -- no crash-report directory and latest.log abruptly ends. While lots of programs do log, there are also lots of situations where a program will just immediately terminate without getting the chance to write the error to a logfile.

I think that saving container output would be a great feature. For space concerns, just saving the last few hundred lines would be sufficient too.

bergice commented 2 months ago

I support this.

FYI, you can use another logger like journald instead which preserves the logs, but you have to ssh to the server to see them.