This article addresses various ways on how to set up logging in the MapTiler Server running on Windows, macOS, Linux, or in Docker.
The next steps will walk you through setting up logging in the MapTiler Server. We will assume that the software is installed, if you need assistance on how to install MapTiler Server, check out
Logging configuration is located in the Server section of the Settings or at the
/admin/settings/server endpoint. Here you can set custom logging levels, logging to the log file, and configure whether the API traffic should be logged as well.
If you preferer running MapTiler Server in docker, you have two options for how to access the logs.
When starting the container in docker, e.g
you should name the container by providing the
--name parameter. You can now access the logs by using the container name:
Any logs produced by the container will be deleted when it is terminated. If you want your logs to persist after the container is shut down, configure logging to a file in the MaptTiler Server admin.
Logging to a file inside the docker container
If you want your logs to outlive the lifespan of the container, set up logging to a file in the admin section covered in the Logging section. If you have mapped a volume for the container, you will be able to access the log file even if the container has been shut down. The path for the file can be found in the Server section of the Settings.Conclusion
Logging allows for immense power and flexibility for the examination of the app’s behavior over time. There are various ways to set up logging in to the MapTiler Server, so don't hesitate and configure it.