# Persistent Log Storage

Source: https://forum.modalai.com/topic/744/persistent-log-storage
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: voxl
Posted: 2022-02-15 19:47:43 UTC by wilkinsaf
Replies: 5 · Views: 1059

## wilkinsaf · 2022-02-15 19:47:43 UTC

I am looking to have journald logs persist. 
I understand that journald stores logs under `/var/log/journal` 
However, I can see that `/var/log/` is under volatile storage.  

 ![f3997075-0c71-47cd-9667-ede88ab0ab53-image.png](https://forum.modalai.com/assets/uploads/files/1644954384882-f3997075-0c71-47cd-9667-ede88ab0ab53-image.png) 

I understand that I should be logging to `/data` if I would like things to persist. Is there a configuration that ModalAI recommends to log service file output on VOXL?

## Reply by wilkinsaf · 2022-02-15 19:57:52 UTC

I might end up having to specify specific log files to write to in my .service files per
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardOutput=

## Reply by wilkinsaf · 2022-02-17 04:02:37 UTC

Was going to use syslog, but saw that the service file points to null. Was wondering if this is done on purpose?

![6435fe47-e67b-46ef-b676-c657c21dcc3d-image.png](https://forum.modalai.com/assets/uploads/files/1645070555765-6435fe47-e67b-46ef-b676-c657c21dcc3d-image.png)

## Reply by wilkinsaf · 2022-02-17 04:06:13 UTC

Thinking an easier way here is to just change the symbolic link here
![cf9ff767-260b-4bf6-b428-c78357d40287-image.png](https://forum.modalai.com/assets/uploads/files/1645070747709-cf9ff767-260b-4bf6-b428-c78357d40287-image.png) 

and then modify journald config file to make sure we do not fill up storage with logs

## Reply by wilkinsaf · 2022-02-17 05:42:26 UTC

This seems to work, but not from bootup. 
Usually, the `systemd-journal-flush.service` watches for `/var/log/journal` to be mounted and then switches logging over to that folder, but that does not seem to be happening.

Instead, I have to restart the `systemd-journald.service` to get it to log in the correct spot.

Maybe because it is a symbolic link, and that is why the service does not see it mounted.... going to try and test that theory

## Reply by wilkinsaf · 2022-02-17 05:58:11 UTC

Yeah, all `systemd-journal-flush.service` is doing is running `journalctl --flush` which is not doing anything when run manually
