Questions tagged [docker-logs]
46 questions
1
vote
0 answers
Docker-compose semi dynamic logging labels, useing special template markup
I was reading documentation and found this part and it got me wondering: is it possible to make a semi-dynamic labels on fluent bit? Did some research and labels part in documentation seems do indicate that this should be possible, but I can't find…

Simas Paškauskas
- 433
- 8
- 20
1
vote
0 answers
Docker logs/information gathering on Windows 10
I have a challenge to collect logs/information on Windows docker desktop. It should be not only container logs/information, it'd be logs/information of docker as a whole. For example: I want to have a container list, a list of containers ports or…

aicatsana
- 11
- 1
1
vote
1 answer
Permission denied when writing logs in Docker
I was trying to write a Docker log file on Ubuntu 20.04 by
sudo docker logs CONTAINER_ID >output.log
But it returned
-bash: output.log: Permission denied
How to solve the permission problem to save the logs? Is the problem inside the container or…

chenghuayang
- 1,424
- 1
- 17
- 35
1
vote
0 answers
Attaching VS Code to a dockerized django app and running the debugger, where are the docker logs?
I have a dockerized django app which I work on with VS Code.
I start the container, then attach to it using VS Code's remote attach.
Then I start the debugger on port 7000 with the following launch file.
I run the code that crashes things, but its…

user1367204
- 4,549
- 10
- 49
- 78
1
vote
0 answers
Running Flask app in debug mode does not provide the debugger is active or the Debugger PIN on the docker desktop logs
I have been using docker desktop in windows 10 and running the flask application with it. So when I change the python code the docker will auto restart and perform. We can be able to check the logs on the docker desktop's container logs. But now it…

Santhosh
- 209
- 2
- 16
1
vote
2 answers
Why docker logs are stored in the system using container ID? Why not using name of the container?
I'm able to find my docker logs stored in the system here:
var/lib/docker/containers/container id/container id-json.log
Why logs are stored by using container ID ? why not using container names like container name-json.log?

hritz220
- 63
- 7
1
vote
1 answer
How to specify number of logs after each match of a particular string using docker log?
I am new to using docker-log commands. I understood how to print logs that match specific string using grep command, here is a simple example:
docker logs {dockerId} | grep "someString"
However, my goal is to per each match print the next specific…

Dastan Alybaev
- 309
- 4
- 12
1
vote
0 answers
Spring-Boot app stdout written to log file on Docker container
I have a Spring-Boot application that I have running in a Docker container. When I run the app standalone outside of the container, all the logs are written to stdout. I need to get the app stdout written to a file on my Docker container.
My…

MeanwhileInHell
- 6,780
- 17
- 57
- 106
1
vote
1 answer
Automatic saving logs from Docker container to the file
I'm quite new to Docker, so maybe the answer to my question is obvious for you, sorry for that. I have a Docker container and I would like to save logs from it to the file so that they will be available even after removing the container.
I know I…

Natalia
- 375
- 3
- 11
0
votes
0 answers
Last Log Value Missing in AWS CloudWatch when Terminating the ECS Task by changing desired count to 0 from 1
I have a java code (maven build) to create a json file and upload the file to S3 and after each upload I record a log message with file name. The logs are getting stored in CloudWatch and I am using "awslogs" as the log driver. When I run the code…
0
votes
0 answers
Docker logs not displayed in the mounted log file
We are having some services running in docker containers on an EC2 machine (Linux based).
These containers are deployed using CircleCI.
Following is the circle CI config.yml
version: 2
jobs:
deploy:
docker:
- image:…

ShwetaJ
- 462
- 1
- 8
- 32
0
votes
1 answer
Running a powershell command redirects the output to the stderr in the case that isn't needed
I am calling this command in powershell: docker logs imagela-cpu-container_03 2>&1.It looks that powershell is redirecting the output of this command to the stderr on calling.This are the logs that are displayed in the container and I want on the…

Alejandro
- 15
- 3
0
votes
0 answers
limit log size using syslog in Docker, sending log externally
I'm using the driver syslog, since I'm sending the log to the external service Coralogix (to be easily analyzed and shared among the team). The problem is that in this way, I can't use the max-size option in the docker-compose.yml, and the log often…

DeLac
- 1,068
- 13
- 43
0
votes
1 answer
how to add debug log in docker container written in C
I am containerizing a simple hello world C program in docker. However, I am unable to see any docker log despite adding printf, fprints and even syscall. As it is mentioned in the link…

myquest5 sh
- 63
- 6
0
votes
1 answer
Elastic Logging plugin for Docker: "error creating logger", "hosts flag is required"
Running Docker 20.10.22 on Ubuntu 22.04 Jammy.
I'm trying to configure my Docker containers to log to Elastic Cloud, either by default through the mechanism of /etc/docker/daemon.json or through the use of command line flags.
I have tried with a…

kthy
- 827
- 10
- 27