2

I have Docker on OpenSuse Leap 42.1. I have setup Remote API. Where can I see the logs/STDOUT of the Remote API service? Specifically the logs indicating API calls such as GET and POST calls.

I checked the docker service logs using:

journalctl -u docker.service

But this only indicates that API is listening on a port. Doesn't actually show the information about the calls being made.

time="2016-10-31T17:44:07.170795338Z" level=info msg="API listen on /var/run/docker.sock"

When I ran the docker deamon directly I was able to see the REST API information in the STDOUT. I am guessing it is not storing STDOUT to logs.

G S
  • 35,511
  • 22
  • 84
  • 118
mumshad
  • 409
  • 1
  • 7
  • 13

1 Answers1

0

I have Docker Engine 1.13.1 on CentOS 7.3.1611.

I added dockerd option.

/usr/bin/dockerd --log-level=debug (...snip...)

I found API log in journalctl.

Feb 15 10:12:52 xxx dockerd[7596]: time="2017-02-15T10:12:52.456651320+09:00" level=debug msg="Calling POST /containers/create"
Feb 15 10:12:52 xxx dockerd[7596]: time="2017-02-15T10:12:52.456886794+09:00" level=debug msg="form data: {\"AttachStdin\":true,...
ngyuki
  • 101
  • 1