Questions tagged [docker-logs]

46 questions
14
votes
1 answer

How to send Docker container logs from Azure App Service to Seq log server?

My website uses a docker container, and I host it on Azure using an Azure App Service. I use a Seq log server to centralize logging. How can I send the Docker container logs from my Azure App Service to my Seq log server? I am afraid that the…
6
votes
1 answer

Make Docker Logs Persistent

I have been using docker-compose to setup some docker containers. I am aware that the logs can be viewed using docker logs . All logs are being printed to STDOUT and STDERR when the containers are run, there is no log 'file' being…
4
votes
0 answers

How to get the container log file using docker-py

As part of docker automation am trying to automate certain docker operation using python docker package. Well I have implemented the most of requirement successfully, But could not find an equivalent method for docker logs My…
Aaditya R Krishnan
  • 495
  • 1
  • 10
  • 31
3
votes
1 answer

Why cant I see any docker logs?

I have a simple script that prints hello every 2 seconds. # entry.py import time while True: print("hello") time.sleep(2) And I have an ultra-simple docker file that runs this script. FROM python:3.9 COPY entry.py entry.py CMD python…
aahnik
  • 1,661
  • 1
  • 11
  • 29
3
votes
2 answers

All combined docker logs with container name

So I am trying to get the combined output of all the container logs with its container name in a log file docker logs --tail -3 with container name >> logst.log file.
3
votes
1 answer

kubernetes pod logging broken with journald logging driver

Looks like journald pod logging ('kubectl logs' command) doesn't work with kubernetes v1.18.x. Is there a way to make this work with v1.18.x? I've set up a multinode cluster with docker logging driver as 'journald' (using /etc/docker/daemon.json)…
Abhay
  • 129
  • 2
  • 11
3
votes
3 answers

Set awslogs log driver on docker container

I want to pass my container logs to AWS Cloud Watch. I'm not able to set the AWS credentials in the Docker Desktop for Mac. Docker Version : Version 19.3.5 Mac OS Version : 10.14.6 I have created ~/.aws/credentials files with the AWS…
2
votes
0 answers

docker compose up disable print to STDOUT

By default docker compose up transfer stdout from containers to both stdout (console) and log file(s). With following line is service definition: logging: driver: none docker will not produce logs but still print everything to STDOUT. Is…
rmrmg
  • 51
  • 4
2
votes
1 answer

Can I specify the color of a service's log prefix in my docker-compose?

I have five services, which all get assigned a random color on docker-compose up at the moment. The problem is, one color is the exact same color as the background of powershell, which I use to up the services. Can I assign a color to each service…
be2213444
  • 607
  • 1
  • 4
  • 10
2
votes
0 answers

Docker container STDOUT not showing in Docker Logs

I am trying to configure my php errors to output to docker logs. All documentation I have read indicates that docker logs are tied to the containers stdout and stderr which come from /proc/self/fd/1 and /proc/self/fd/2. I created a symlink from my…
Evan Dhillon
  • 93
  • 3
  • 9
1
vote
1 answer

Does docker compose log environment variables loaded by env_file?

We can load random data into a container like this: vars.env FOO=123 BAR=abc docker-compose.yml my_service: image: my_image env_file: - ./vars.env # ... Is it possible that those environment variables will be logged? (I'm running the…
lonix
  • 14,255
  • 23
  • 85
  • 176
1
vote
1 answer

docker-compose up dumps several days' worth of logs to stdout

I have an EC2 instance running a dockerized application using docker-compose. Every time I run docker-compose up, many days' worth of logs to stdout for all services. This means that I have to wait up to an hour before all the logs have been printed…
Audiopolis
  • 530
  • 5
  • 24
1
vote
0 answers

Cannot exit from docker logs -f in jenkins pipeline

By adding this command docker logs -f , able to print the docker logs, but it is not exiting from this command after the server is running. I have other commands that have to be run after the docker run, but the logs command is not…
1
vote
1 answer

Docker-compose logs for yml with non-default name

I have 2 docker-compose files. One of them has a non-default docker-compose file name docker-compose-services.yml. The second one is docker-compose.yml. I need to follow logs from time to time for docker-compose-services.yml. Is there an option to…
1
vote
0 answers

Not able to see the error logs in Docker logs [Using cmd "Docker logs "]

1.AmazonSNSclient snsClient=null; 2.snsClient=AmazonSNSClientBuilder.standard.withRegion("us-east-2").build(); 3.System.out.println(snsClient); 4.snsClient.publish(topicAr,"Sample SNS Message"); 5.System.out.println("Success in sending the request…
elves 0055
  • 39
  • 2
1
2 3 4