Comments (5)
@robinroestenburg can you give me an use case in which this would be useful? Not providing uid/gid was an intended behaviour because s6-log already outputs everything with 0644 mode and anyone could read logs.
Taking advantage of the occasion, did you find these utilities useful? I have mixed feelings related to logging...
from s6-overlay.
@glerchundi hmm, I overlooked that. Is that a feature of the s6-log program?
The log directories on my images are volumes that are linked from the docker host. My s6-images log using a user that I know is present on the host. I was converting the log scripts to use logutil-service and wanted to keep the uid the same to avoid problems.
But I guess 0644 will do the trick.. I am in the process of logging every to a separate data container (for processing with logstash), it won't even matter after that.
Taking advantage of the occasion, did you find these utilities useful? I have mixed feelings related to logging...
The images inheriting from my s6 base image now have 12 logging fifos configured. They all had the same setup and logging scripts. So, this reduces a lot of duplication and is more readable.
On the other hand, the scripts were not too complex and there is no magic for new users / other colleagues to figure out. But I think that does not outweigh the previous points..
What are your doubts?
from s6-overlay.
Yep, it's interesting to see how do people handle logging in containerized world. I thought exactly the same thing as you did. Log different kind of errors to different places (nginx: error, access | mariadb: error, general-query, slow-query) and then forward to a centralized place (using fluentd, logstash or whatever) but not before tagging them.
The images inheriting from my s6 base image now have 12 logging fifos configured. They all had the same setup and logging scripts. So, this reduces a lot of duplication and is more readable.
Wow, so definitely this helps keeping everything as DRY as possible.
On the other hand, the scripts were not too complex and there is no magic for new users / other colleagues to figure out. But I think that does not outweigh the previous points..
That was my concern, if this would be interesting just for me because i'm not aligned with the people thoughts or not. And if these scripts hide details that would make things happen automagically.
What are your doubts?
Doubts solved. Thanks for your feedback!
from s6-overlay.
In general terms of logging, (not specific to s6) i am looking forward to the rotation support, they will officially add in next versions of docker.
Actually I try to rotate my logs now with logrotate, but it doesn't actually rotate them.
from s6-overlay.
@dreamcat4 in the latest release (1.10.0.3) log rotation comes out-of-the-box with this configuration (which can be override by using S6_LOGGING_SCRIPT
envar):
n20 s1000000 T
configuration in s6-log
means (as "stated" by s6-log
documentation): "Logs all of stdin, prepending every line with a ISO8601 timestamp, with a maximum archive of 20 log files of 1 MB each"
from s6-overlay.
Related Issues (20)
- `S6_CMD_WAIT_FOR_SERVICES=1` makes no diference HOT 15
- `/command` not present in PATH HOT 7
- systemd notify service conversion exmaple HOT 4
- s6-notifyoncheck: fatal: s6-supervise not running. HOT 3
- Installing S6 on official php-fpm container shows no log output from S6 HOT 5
- Issue with s6-overlay in Cattr project when deployed on Kubernetes HOT 6
- `UID not set` error HOT 10
- Question: pass args to the underlying service HOT 6
- s6-overlay v3 only sends SIGTERM to `/etc/services.d` after `S6_SERVICES_GRACETIME` HOT 8
- Setting S6_READ_ONLY_ROOT does not copy `/etc` to `/run/s6/etc` HOT 3
- Service is started, but reported as "normally down", seemingly by default HOT 11
- 3.1.6.1 hangs at the very end of shutdown for more than a minute HOT 3
- In some rare occasions s6-overlay hangs at shutdown for undefined amount of time HOT 4
- Using s6-overlay with ECS Exec HOT 8
- How to create something similar like cont-init if this one is deprecated ? HOT 3
- Best practice for redirecting output from app1 to app2 HOT 5
- Problem using S6_STAGE2_HOOK to run shell script HOT 2
- s6-linux-init: warning: parent wrote to fd 3! HOT 9
- How to read ENV variables from a file for the main process (defined in CMD) HOT 4
- Shutdown container during s6-rc startup leads to deadlock HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s6-overlay.