How to check the logs in the Docker container

Output an error in php.

error_log()

Check the log.

Docker logs -f Container ID

# -f(follow)Continue to output with.

When you want to display only the access log

Docker logs container ID-f 2>/dev/null

# /dev/Erase the display with null. 2 is an error output

When you want to display only the error log

Docker logs container ID-f 1>/dev/null

# /dev/Erase the display with null. 1 is standard output

with docker-compose

docker-compose logs

#The access log and error log cannot be separated.

Recommended Posts

How to check the logs in the Docker container
How to update pre-built files in docker container
How Docker works ~ Implement the container in 60 lines
How to check Rails commands in the terminal
[AWS] How to check logs
Check MySQL logs in Docker environment
How to correctly check the local HTML file in the browser
[Docker] How to access the host from inside the container. http://host.docker.internal:
How to use Docker in VSCode DevContainer
How to get the date in java
Understand in 5 minutes !! How to use Docker
[Docker] Check the running container and enter there
How to get a heapdump from a Docker container
How to add sound in the app (swift)
How to install Docker
[Docker] How to build when the source code is bind-mounted on the container
How to build the simplest blockchain in Ruby
Android development, how to check null in the value of JSON object
How to start a Docker container with a volume mounted in a batch file
How to mount the batch file location via WSL2 and start the Docker container
How to display the amount of disk used by Docker container for each container
How to check the latest version of io.spring.platform to describe in pom.xml of Spring (STS)
How to set the display time to Japan time in Rails
[Java] How to omit the private constructor in Lombok
Organized how to interact with the JDK in stages
How to delete untagged images in bulk with Docker
How to specify the resource path in HTML import
How to debug the generated jar file in Eclipse
How to launch Swagger UI and Swagger Editor in Docker
[Rails] How to display an image in the view
How to set Docker nginx
How to check JSF version
How to install Docker in the local environment of an existing Rails application [Rails 6 / MySQL 8]
How to use UsageStatsManager in Android Studio (How to check the startup time of other apps)
How to check the WEB application created in the PC development environment on your smartphone
[Docker] How to see the contents of Volumes. Start a container with root privileges.
How to check if the characters entered in the Swift Text Field are email addresses
How to get the class name / method name running in Java
Copy and paste the file contents in Ubuntu's Docker container
How to use the getter / setter method (in object orientation)
How to set chrony when the time shifts in CentOS7
How to connect the strings in the List separated by commas
Memo: [Java] How to check groupId etc. described in pom.xml
Wait for the container service to start with docker healthcheck
How to create a placeholder part to use in the IN clause
How to retrieve the hash value in an array in Ruby
How to add the same Indexes in a nested array
How to derive the last day of the month in Java
How to disable existing selected items in the select box
How to switch Java in the OpenJDK era on Mac
How to check the extension and size of uploaded files
[Docker context] ~ How to access docker in remote environment from VScode ~
[Docker] How to forcibly disconnect the session connected to the database [Postgres]
[Rails] How to display information stored in the database in view
How to check the database of apps deployed on Heroku
How to use Lombok in Spring
How to find May'n in XPath
Introduction to Linux Container / Docker (Part 1)
How to hide scrollbars in WebView
How to use the form_with method
How to run JUnit in Eclipse