Get log directory.
@return string
358105
public function getLogDir()
    {
        static $dir;
        if (empty($dir)) {
            $dir = $this->getOpenDir() . '/log/';

            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
        }
        return $dir;
    }
834049
public function getErrorLogPath()
    {
        $sLogPath = $this->_sErrorLogPath;

        if ( !is_dir( $sLogPath ) ) {
            mkdir( $sLogPath, 0777, true );
        }

        return $sLogPath;
    }
360675
protected function getDumpDirectory()
    {
        $dumpName = $this->getDumpName();
        $databaseHandler = $this->getDatabaseHandler();
        $directory = $this->getBaseDumpDirectory() . '/' . $databaseHandler->getDbName() . '/' . $dumpName . '/';
        if (!file_exists($directory)) {
            mkdir($directory, 0777, true);
        }

        return $directory;
    }
1248929
public function getLog()
    {
        if($this->app->exists(LoggerInterface::class)) {
            return $this->app->get(LoggerInterface::class);
        }
        $var_dir = $this->vars_dir . '/log/app.log';
        $logger  = new Logger('log');
        $logger->pushHandler(
            new FingersCrossedHandler(new StreamHandler($var_dir, Logger::DEBUG))
        );
        $this->app->set(LoggerInterface::class, $logger, true);
        return $logger;
    }
1130151
@Override
    public File getServerLogDirectory() {
        String logLocation = TrConfigurator.getLogLocation();
        if (logLocation != null) {
            return new File(logLocation);
        } else {
            return null;
        }
    }
1021355
public function getModulePath(): string
    {
        $reflector = new ReflectionClass(get_class($this));
        $fn = $reflector->getFileName();
        $directory = dirname($fn);
        return $directory;
    }
1309290
public function getDirectory() : ?string 
    {
        if ( ! $this->hasDirectory()) {
            $this->setDirectory($this->getDefaultDirectory());
        }
        return $this->directory;
    }
1213025
protected function getRootDirectory()
    {
        if ($this->addon) {
            $directories = $this->addon->config('addon.directories');

            if (! $directories) {
                $directories = ['classes'];
            }

            return $this->addon->path($directories[0]);
        }
        else {
            return parent::getRootDirectory();
        }
    }
1311660
protected function getVolatileDirectory()
    {
        if ($this->volatileDirectory === null) {
            $this->volatileDirectory = $this->app->make(VolatileDirectory::class);
        }

        return $this->volatileDirectory;
    }
655417
private function getLogFileName() : string
    {
        $file_name = $this->file_name;
        if ($this->filename_processor){
            $file_name = $this->filename_processor->process($file_name);
        }
        $file_name = self::escapeFileName($file_name);
        return $file_name;
    }
167498
protected @Nonnull File getLogDir() {
        File dir = new File(Jenkins.getInstance().getRootDir(),"logs/slaves/"+nodeName);
        if (!dir.exists() && !dir.mkdirs()) {
            LOGGER.severe("Failed to create agent log directory " + dir.getAbsolutePath());
        }
        return dir;
    }
799019
public function getLogFiles()
    {
        $files = new Finder();
        $files->files()->in(LOG_DIR)->name('*.log')->sortByModifiedTime();
        $logs = array();
        /** @var \SplFileInfo $file */
        foreach ($files as $file) {
            $size = $file->getSize() / 8 / 1024;
            $time = date('c', $file->getMTime());
            $dateTime = new \DateTime($time);
            if (!isset($logs[$dateTime->format('Y')])) {
                $logs[$dateTime->format('Y')] = [];
            }
            $logs[$dateTime->format('Y')][$dateTime->format('m')][$time] = [
                'filename' => $file->getFilename(),
                'size' => round($size, 3),
            ];
            krsort($logs[$dateTime->format('Y')][$dateTime->format('m')]);
            krsort($logs[$dateTime->format('Y')]);
        }
        return $logs;
    }
347645
public function getCwd()
    {
        $path = $this->wrapper->pwd();

        if ('/' === $path) {
            return new Directory('/');
        }

        return $this->findDirectoryByName($path);
    }
698283
public function getCacheDir(): string
    {
        if ($this->_cache_dir === null)
            $this->_cache_dir = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'cache');

        return $this->_cache_dir;
    }
1032695
public function checkDirectory(): bool
    {
        if ($this->directory == null) {
            throw new LoggerException('Log directory is not defined yet');
        }

        self::$directoryChecked = self::$directoryChecked ?: is_dir($this->directory);
        if (!self::$directoryChecked) {
            self::$directoryChecked = (bool) @mkdir($this->directory, 0644, true);
            if (self::$directoryChecked === false) {
                throw new LoggerException(sprintf('Cannot make directory, error[%s]',
                    error_get_last()['message'] ?? 'Unknown'));
            }
        }

        return self::$directoryChecked;
    }
1237673
public function getLogs()
	{
		if (file_exists($this->logPath))
		{
			$log = Filesystem::read($this->logPath);
			$levels = array();
			$this->logs = explode("\n", $log);
		}
		else
		{
			return array();
		}

		return $this->logs;
	}
1340821
protected function getResourceLog()
    {
        if (($log = \Arbit\VCSWrapper\Cache\Manager::get($this->path, $this->currentVersion, 'log')) === false) {
            $svnLog = svn_log($this->root . $this->path);

            $log = array();
            foreach ($svnLog as $nr => $entry) {
                $log[$entry['rev']] = new \Arbit\VCSWrapper\LogEntry(
                    $entry['rev'],
                    $entry['author'],
                    $entry['msg'],
                    strtotime($entry['date'])
                );
            }
            uksort($log, array($this, 'compareVersions'));
            $last = end($log);

            \Arbit\VCSWrapper\Cache\Manager::cache($this->path, $this->currentVersion = (string) $last->version, 'log', $log);
        }

        return $log;
    }