# Yugabyte Log Rotation

**URL:** <https://forum.yugabyte.com/t/yugabyte-log-rotation/523>\
**Category:** General\
**Created:** [October 4, 2019, 9:35pm UTC](https://forum.yugabyte.com/t/yugabyte-log-rotation/523 "2019-10-04T21:35:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewLiuRM](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@AndrewLiuRM](https://forum.yugabyte.com/u/AndrewLiuRM)\
**Post date:** [October 4, 2019, 9:35pm UTC](https://forum.yugabyte.com/t/yugabyte-log-rotation/523/1 "2019-10-04T21:35:30Z")

</div>

Hi, I would like to know if yugabyte does any log rotation?

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [October 9, 2019, 8:53am UTC](https://forum.yugabyte.com/t/yugabyte-log-rotation/523/2 "2019-10-09T08:53:45Z")

</div>

@AndrewLiuRM

For `yb-tserver/yb-master` the log rotation size is controlled by the --max\_log\_size gflag.

`--max_log_size=256` will limit each file to 256MB.  
The glog default size is 1.8GB if someone is not passing this argument.

YSQL (we also have the additional postgres.log) has daily and size based log rotation for postgres\*.log files - i.e. a new log file will be created per day (or after 10 MB size). However, there is no purging of older log files.

While log purging is only available in Yugabyte Platform.

---

<div class="post-metadata">

**Author:** ![AndrewLiuRM](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@AndrewLiuRM](https://forum.yugabyte.com/u/AndrewLiuRM)\
**Post date:** [October 9, 2019, 11:55pm UTC](https://forum.yugabyte.com/t/yugabyte-log-rotation/523/4 "2019-10-09T23:55:48Z")

</div>

Got it! Thank you so much!

---

<div class="post-metadata">

**Author:** ![AndrewLiuRM](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@AndrewLiuRM](https://forum.yugabyte.com/u/AndrewLiuRM)\
**Post date:** [October 30, 2019, 10:58pm UTC](https://forum.yugabyte.com/t/yugabyte-log-rotation/523/5 "2019-10-30T22:58:06Z")

</div>

Hi, I was looking at the docs for yb-master/yb-tserver. I could not find these flags anymore. Are they still there or they are deprecated? Thank you!

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [October 31, 2019, 8:28am UTC](https://forum.yugabyte.com/t/yugabyte-log-rotation/523/6 "2019-10-31T08:28:38Z")

</div>

It’s here. [Inspect logs | YugabyteDB Docs](https://docs.yugabyte.com/latest/troubleshoot/nodes/check-logs/#logs-management)

Looks like our docs guy missed them in the references page, will add them shortly.

---

<div class="post-metadata">

**Author:** ![stevebang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/stevebang/32/152_2.png) [@stevebang](https://forum.yugabyte.com/u/stevebang)\
**Post date:** [October 31, 2019, 3:17pm UTC](https://forum.yugabyte.com/t/yugabyte-log-rotation/523/7 "2019-10-31T15:17:46Z")

</div>

Hi Andrew — There are many more configuration options than are documented. Since joining Yugabyte recently, I’ve been updating and adding to the configuration options, or flags. Many of the options are intended for support only, but some of the missing log options definitely should be added (and will be shortly).

To see all of the options for YB-Master and YB-TServer, you can always run the online help commands from the Yugabyte home directory:

```auto
$ ./bin/yb-master --help

```

or

```auto
$ ./bin/yb-tserver --help

```

These online listings are very long, so you might want to pipe them to a text file for easier searching.

I’ll review the non-documented configuration options with engineering to make sure that the useful settings are added to the documentation.

Steve
