Replies: 3 comments 2 replies
-
Any thoughts @WoLfulus ? |
Beta Was this translation helpful? Give feedback.
-
I'm unsure about this one. All of the output is going to the log file? Or some of them are going to the stdout stream? |
Beta Was this translation helpful? Give feedback.
-
Came back to this problem and figured it out. The logger only sets up the stream output if there is a loadable config. I was generating error loglines by going to a bad URL The workflow in the code is
If there's no project to indicate which config file to use, then there's no config file to load, so there's no logger.path available, and the system never overrides the default path. The workflow above fails to load a config at step 2) when I generate a logline using a url like This looks like what @WoLfulus might have been getting at with the question about the possible split in log destinations. I'm not quite sure the best way forward - might just change the hardcoded default location. |
Beta Was this translation helpful? Give feedback.
-
Hi folks,
We're running a Directus 8.6.2 container in AWS ECS, with logs being shipped via STDOUT/Docker Logs to AWS Logs. We're using our own container with nginx/php7.3-fpm rather than the official container. I've explicitly turned off env var configuration, as we want to use the multiple API config files feature of v8.
The problem is that application logs are still being written to disk rather than sent to stdout, and I can't figure out why. In my test setup, I only have one config file (api.php) and only one Directus env var (turning off env-based config), and I still can't make it work.
This is what I can see from inside the docker container in the cloud
So despite env var config being disabled and logger.path being set to php://stdout, the errors are still being written to disk (and are not appearing in our central logging).
The documentation is pretty slim on the config file, and I couldn't find much documentation around logging config. If I switch the DIRECTUS_USE_ENV to 1, the container predictably crashes since there are no other Directus env vars.
Is there something I'm not doing right here? Something I've missed?
Beta Was this translation helpful? Give feedback.
All reactions