System logfile: What is the directory path to it?

Hello! :smirk:

I’m attempting to find the local server directory path the logfile so I just can trim and empty it as it has grown quite large over the years.
image

But I cannot seem to find it in the installation/root directory where we installed Own cloud on our server.

I hope you guys can enlighten me! :bulb:

Thanks in advance.
kind regards
PowerQuest

Usually, it’s located at the ownCloud ‘data’ directory.

You should consider setting up Log Rotation to avoid such issues.

Thanks for the help and the reply @alfredb :+1:

Well…
Is there way to limit the size of the file to XYZ so Owncloud deletes the content in the log file automatically?

Kind regards
PowerQuest

Before attempting to “reinvent the wheel”, is there a published format for the log file, or better still a formatting tool?

1 Like

Yes. As soon as the log exceeds a given size, it will be archived. Logging is switched to a new file. For me, the built-in log rotation works good enough:

-rw-r----- 1 www-data www-data 6.1M Sep 14 03:30 owncloud.log
-rw-r----- 1 www-data www-data  11M Aug 28 15:30 owncloud.log.1

config.php:

/**
 * Define the maximum log rotation file size
 * Enables log rotation and limits the total size of the logfiles.
 * The default is 0 or false which disables log rotation.
 * Specify a size in bytes, for example 104857600
 * (100 megabytes = 100 * 1024 * 1024 bytes).
 * A new logfile is created with a new name when the old logfile reaches the defined limit.
 * If a rotated log file is already present, it will be overwritten.
 * If enabled, only the active log file and one rotated file are stored.
 */
'log_rotate_size' => false,

Good question, even if I don’t have a (real) answer. :grin:
I often copy/paste an interesting record to the JSON viewer. But this is only little help, the message part with the stack trace is still encoded.

image