# How to control system\_logs.idb

**URL:** <https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [February 24, 2020, 7:41pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553 "2020-02-24T19:41:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [February 24, 2020, 7:41pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/1 "2020-02-24T19:41:04Z")

</div>

I can’t tell which of the logging sub-systems is generating the /var/log/ignition/system\_logs.idb file.

I’m not finding any reference to it in ignition.conf or log4j.properties. Where and how can I adjust the max size/entry limits? Can I make it split automatically w/o restarting Ignition?

Also, why am I finding ignition.conf in both /etc/ignition and /var/lib/ignition/data? Which takes precedence?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 24, 2020, 8:17pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/2 "2020-02-24T20:17:10Z")

</div>

The system\_logs.idb file is (mostly) controlled by the `logback.xml` file in the `data/` directory; there should be some commented out lines you can use to change maintenance settings, _but_ you can’t configure it to “roll” like you can the wrapper.log files - it’s designed specifically to create and maintain a single database file. Also, any changes made would require an Ignition restart to take effect.

`etc/ignition/ignition.conf` should be a symlink to `/var/lib/ignition/data/ignition.conf`. Try `ls -L` to confirm.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [February 24, 2020, 8:36pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/3 "2020-02-24T20:36:22Z")

</div>

> [@paul-griffith](#):
>
> `etc/ignition/ignition.conf` should be a symlink to `/var/lib/ignition/data/ignition.conf` . Try `ls -L` to confirm.

Right idea, wrong direction. The files over in /var/lib/ignition/data are symbolic links back to /etc/ignition on my system. I should've been able to figure that out on my own. Thank you for the hint.

For logback, am I correct in thinking I should be using this documentation for help configuring it: [Chapter 3: Configuration](http://logback.qos.ch/manual/configuration.html)

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [February 24, 2020, 8:43pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/4 "2020-02-24T20:43:31Z")

</div>

No. That logback documentation is too low-level. I think I can only use those four fields that are commented right there in logback.xml. On the “minTimeBetweenMaintenance” field, is that in seconds?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 24, 2020, 8:57pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/5 "2020-02-24T20:57:14Z")

</div>

Milliseconds.

```java
    protected int entryLimit = 50000;
    //The number of times to perform deletions before performing a vacuum.
    protected int vacuumFrequency = 3;
    //Max events puts a cap on how many events can happen (the lesser of this and entryLimit will be used) before
    // maintenance is performed
    protected long maxEventsPerMaintenance = 5000;
    //However, min time puts a cap on frequency. It takes precedence over max_events.
    protected long minTimeBetweenMaintenance = 60000;

```

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [March 2, 2020, 2:35pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/6 "2020-03-02T14:35:51Z")

</div>

Last week I un-commented that block in logback.xml and restarted my gateway. My output sqlite db is still growing…

I searched through the wrapper log for any hints that it was doing anything. I’m not seeing any references to “logback” since I started the gateway. I see “Starting logfile maintenance” only once right after starting the gateway, but not again since.

I do see log lines implying that logback is loading the file I edited in /var/lib/ignition/data/logback.xml, but no indication that the configuration variables I added are being used.

Any hints on how to tell if the config file is being loaded properly or is doing what it’s supposed to?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 2, 2020, 8:15pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/7 "2020-03-02T20:15:08Z")

</div>

Are you getting a `Scheduling logfile maintenance. Last maintenance: %s, events since then: %s` in the logs?

It looks like the calculation for logfile maintenance is done whenever records are added, so the check for whether to run maintenance could have not been met yet?

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [March 2, 2020, 9:45pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/8 "2020-03-02T21:45:28Z")

</div>

Looks like that might be it. I’ll give it more time and check again later.

```auto
ignition@dev-ignition1:/var/log/ignition$ grep "Scheduling" wrapper.log
INFO | jvm 1 | 2020/01/21 04:22:13 | Scheduling logfile maintenance. Last maintenance: Tue Jan 21 04:21:12 UTC 2020, events since then: 47900
INFO | jvm 1 | 2020/01/22 21:48:02 | Scheduling logfile maintenance. Last maintenance: Thu Jan 01 00:00:00 UTC 1970, events since then: 0
INFO | jvm 1 | 2020/01/28 15:39:34 | Scheduling logfile maintenance. Last maintenance: Thu Jan 01 00:00:00 UTC 1970, events since then: 0
INFO | jvm 1 | 2020/02/08 13:31:57 | Scheduling logfile maintenance. Last maintenance: Tue Jan 28 15:39:34 UTC 2020, events since then: 5001
INFO | jvm 1 | 2020/02/13 15:38:32 | Scheduling logfile maintenance. Last maintenance: Thu Jan 01 00:00:00 UTC 1970, events since then: 0
INFO | jvm 1 | 2020/02/24 18:12:57 | Scheduling logfile maintenance. Last maintenance: Thu Feb 13 15:38:32 UTC 2020, events since then: 5001
INFO | jvm 1 | 2020/02/24 18:14:08 | Scheduling logfile maintenance. Last maintenance: Thu Jan 01 00:00:00 UTC 1970, events since then: 0
INFO | jvm 1 | 2020/02/24 21:00:13 | Scheduling logfile maintenance. Last maintenance: Thu Jan 01 00:00:00 UTC 1970, events since then: 0

```

---

<div class="post-metadata">

**Author:** ![Arshia\_Ilaty](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@Arshia\_Ilaty](https://forum.inductiveautomation.com/u/Arshia_Ilaty)\
**Post date:** [September 25, 2023, 9:29pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/9 "2023-09-25T21:29:23Z")

</div>

> [@paul-griffith](#):
>
> maintenanc

Would you please mention how did you get this file? I would like to have a file with all the usernames who logged in and also made some changes. I think this information would be useful.

---

<div class="post-metadata">

**Author:** ![GregCavazos](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@GregCavazos](https://forum.inductiveautomation.com/u/GregCavazos)\
**Post date:** [September 25, 2023, 9:41pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/10 "2023-09-25T21:41:46Z")

</div>

I think Audit logs is what you are looking for. [https://docs.inductiveautomation.com/display/DOC81/Audit+Log+and+Profiles](https://docs.inductiveautomation.com/display/DOC81/Audit+Log+and+Profiles)

---

<div class="post-metadata">

**Author:** ![Arshia\_Ilaty](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@Arshia\_Ilaty](https://forum.inductiveautomation.com/u/Arshia_Ilaty)\
**Post date:** [September 26, 2023, 3:22pm UTC](https://forum.inductiveautomation.com/t/how-to-control-system-logs-idb/32553/11 "2023-09-26T15:22:41Z")

</div>

Very helpful. Thank you.
