File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 */
88namespace OC \Log ;
99
10+ use OCP \AppFramework \Utility \ITimeFactory ;
11+ use OCP \BackgroundJob \TimedJob ;
1012use OCP \IConfig ;
1113use OCP \Log \RotationTrait ;
1214use Psr \Log \LoggerInterface ;
1719 * For more professional log management set the 'logfile' config to a different
1820 * location and manage that with your own tools.
1921 */
20- class Rotate extends \ OCP \ BackgroundJob \Job {
22+ class Rotate extends TimedJob {
2123 use RotationTrait;
2224
25+ public function __construct (ITimeFactory $ time ) {
26+ parent ::__construct ($ time );
27+
28+ $ this ->setInterval (5 );
29+ }
30+
2331 public function run ($ argument ): void {
2432 $ config = \OCP \Server::get (IConfig::class);
2533 $ this ->filePath = $ config ->getSystemValueString ('logfile ' , $ config ->getSystemValueString ('datadirectory ' , \OC ::$ SERVERROOT . '/data ' ) . '/nextcloud.log ' );
You can’t perform that action at this time.
0 commit comments