Location of logs for the app which has event listener

Hi Team, where i can find logs for the custom app which i have developed and deployed to nextcloud dev enviorment . i have written some statement to print the event data on console , i used this command docker exec -ti master-nextcloud-1 tail -f data/nextcloud.log but in this file there are no logs

“”<?php
declare(strict_types=1);
namespace OCA\DetectUpload\Listener;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use Psr\Log\LoggerInterface;
class FileUploadListener implements IEventListener {
private $logger;
public function __construct(LoggerInterface $logger) {
$this->logger = $logger;
}
public function handle(Event $event): void {
$this->logger->info(“Test=> Event Occurred”);
if ($event instanceof \OC\Files\Event\FileCreatedEvent) {
// Retrieve information about the uploaded file
$file = $event->getFile();
$filePath = $file->getPath();
$this->logger->info("Test=> ".$filePath);
}
}
}

Default loglevel for Nextcloud Server is 2 (WARN). So only WARN/ERROR/FATAL are logged. Adjust your config:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html

1 Like