Skip to content

Error log function #8

@squirll

Description

@squirll

Hi, here is some idea to use

in index.php line 1130

public function logger($log) {
    if ($log != '') {
        $fh = fopen($this->base() . '/log/log.log', "a");
        if (is_array($log)) {
            fwrite($fh, date('Y-m-d H:i:s') . "\n");
            foreach ($log as $key => $value) {
                fwrite($fh, $value . "\n");
            }
            fwrite($fh, "\n\n");
        } else {
            fwrite($fh, date('Y-m-d H:i:s') . "\n" . $log . "\n\n");
        }
        fclose($fh);
    }
}

make /log/log.log directory and file in root of framework and call it $this->core->logger('whatever'); and now is easy to make any log ;)
i hope that i help someone ;)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions