PUM_Utils_Logging::init()

Get things started


Description Description


Source Source

File: classes/Utils/Logging.php

	public function init() {
		$upload_dir     = wp_upload_dir( null, false );
		$this->filename = 'pum-debug.log';
		$this->file     = trailingslashit( $upload_dir['basedir'] ) . $this->filename;

		if ( ! is_writeable( $upload_dir['basedir'] ) ) {
			$this->is_writable = false;
		}

		// Truncate long log files.
		if ( file_exists( $this->file ) && filesize( $this->file ) >= 1048576 ) {
			$this->truncate_log();
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.