How to leave a log in a file

Hi support team,
I use Vault 1.4.3 on Docker Container(vault:latest)

Vault Run Default Logging Option is below
==> Vault server started! Log data will stream in below

How to leave a log in a file ???
for example, local.json file set below, but is not working
“log_level”: “debug”,


As far as I understand you are trying to save the Vault’s output to a file. The easiest way to save Vault operational logs to a file would be vault server -dev -log-level="trace" > ~/vault.log 2>&1, this would save both stderr and stdout to the file named vault.log in your home directory.

My example uses a -dev server, but the idea is the same.


Thank you for your reply,
printing standard output and standard error in a file.

I wonder if Vault have any of the options
that record logs directly in the log directory.


Not that I know of, this would be the easiest way to get all the operational Vault logs that i can think of.


Hi Martin,
thank you for your help.
If you don’t have this feature right now,
I hope it will be added in the future and become a better product


In Vault 1.5 RC that just came out, we have vault monitor which you might find helpful.


Hi Martin,
It is a good news.

Add a new subcommand, vault monitor , for tailing server logs in the console. [GH-8477]