Skip to content
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

Log attachment automation #27

Closed
rexdjw opened this issue Aug 28, 2019 · 1 comment
Closed

Log attachment automation #27

rexdjw opened this issue Aug 28, 2019 · 1 comment

Comments

@rexdjw
Copy link

rexdjw commented Aug 28, 2019

Hi Max,
Thanks for all your hard work on this project!

I was wondering about the log system implementation with compose though. Since the startup requires logs -f, I'm wondering how I might bake this into restart policies? If the system goes down, or the docker gets detattached from the console log output for some reason..would you have any recommendations for tieing them together?

Thanks

@crazy-max
Copy link
Owner

crazy-max commented Sep 3, 2019

Hi @rexdjw,

Sorry for the delay, pretty busy those days 🚀

By default, Docker captures the standard output (and standard error) of containers, and writes them in files using the JSON format using the default JSON File logging driver.

About compose, If you don't change the name of root folder of your compose file and service name inside, logs will be kept across restart or host shutdown. You can docker inspect your container to see where their logs are:

$ docker inspect --format='{{.LogPath}}' <container id/name>

If you want to manage logs yourself, you can use F2B_LOG_TARGET to change log target. You can use /data/failban.log to keep log persisted for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants