Save something for the logs.

@param string|string[] $message
320590
public function log($message)
    {
        $messages = (array) $message;
        foreach ($messages as $message) {
            $this->getLogger()->info($this->prependHandle($message));
        }
    }
365402
public function save($message = null)
    {
        $this->arguments[] = 'branch';
        if ($message) {
            $this->arguments[] = $message;
        }
        return $this->run();
    }
957318
private function overwrite($message) {
        if ($this->overwrite) {
            if (!$this->firstRun) {
                // Move the cursor to the beginning of the line
                $this->output->write("\x0D");

                // Erase the line
                $this->output->write("\x1B[2K");

                // Erase previous lines
                if ($this->formatLineCount > 0) {
                    $this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount));
                }
            }
        }
        elseif ($this->step > 0) {
            $this->output->writeln('');
        }

        $this->firstRun = false;

        $this->output->write($message);
    }
1283242
public function message($message)
    {
        if(trim($message))
        {
            $msg = new stdClass();
            $msg->type = 'text';
            $msg->message = $message;
            $this->messages[] = $msg;
        }        
    }
173330
public function prepend($message)
    {
        $this->log = [$message] + $this->log;
        $this->extendedLog = [$message] + $this->extendedLog;
    }
913652
private function writeOutput($message)
    {
        $lines = explode("\n", $message);

        if ($this->overwrite) {
            // clear the screen
            $this->clear();
        } else {
            // move to new line
            $this->output->writeln('');
        }

        // append whitespace to center the board
        foreach ($lines as $i => $line) {
            $this->output->writeln(str_pad($line, $this->spacesBeforeStart + strlen($line), "\x20", STR_PAD_LEFT));
        }
    }
612330
public function save(array $log, $message = null)
    {
        DB::beginTransaction();
        try {
            $this->resolveJsonCastableColumns($log);
            $inserted = Logs::insert($log);
            if (!$inserted) {
                throw new Exception('Unable to save log');
            }
            $lid          = DB::getPdo()->lastInsertId();
            $notification = Notifications::query()->firstOrNew([
                'brand_id'    => brand_id(),
                'category_id' => NotificationCategory::where('name', 'default')->first()->id,
                'type_id'     => NotificationTypes::where('name', 'admin')->first()->id,
                'name'        => $log['name'],
            ]);
            if (!$notification->exists) {
                $notification->active = 1;
                $notification->save();
                $notification->contents()->save(new NotificationContents([
                    'lang_id' => lang_id(),
                    'title'   => $log['name'],
                    'content' => $message
                ]));
            }
        } catch (Exception $ex) {
            DB::rollback();
            return false;
        }
        DB::commit();
        return true;
    }
876555
public function logMessage(Message $message): void
    {
        if (in_array($message->getLevel(), $this->config['log'])) {
            if ($this->getMessageFunction !== null) {
                $line = call_user_func($this->getMessageFunction, $message);
            } else {
                $time = $message->getTime()->format('y-m-d H:i:s.v');
                $level = strtoupper($message->getLevel());
                $space = str_repeat(' ', 10 - strlen($level));
                $who = $message->getWho() ?? Log::getWho();
                $line = "{$time} {$level}{$space}{$who}\t{$message->getMessage()}\n";
            }

            if (is_string($line)) {
                print $line;
            }
        }
    }
411155
public function log($level, $message, array $context = array())
    {
        if (!$this->fileName) {
            return;
        }
        file_put_contents($this->fileName, '['.$level.'] - '.$message.' | '.serialize($context));
    }
402626
public static function makeLog($message, array $context = [], array $params = [])
    {
        self::init($params);
        self::$instance->makeLog($message, $context);
    }
484057
protected function note(...$message): void
    {
        if ($this->notice instanceof Notice) {
            $this->notice->add($message);
        }
    }
411676
protected function setCliMessage($message)
    {
        if (GC_CLI) {
            $this->cli->line($this->translation->text($message));
        }
    }
135599
public function log($message)
    {
        if (null !== $this->logger) {
            call_user_func(array($this->logger, $this->level), $message);
        }
    }
944988
public function notice($message, array $context = []): void {
        $this->log(LogLevel::NOTICE, $message, $context);
    }
1190194
public function warning($message): void
	{
		$message = $this->logMessToArray($message);
		$this->log(array_merge(['SEVERITY' => 'WARNING'], $message));
	}
276915
private function save(array $messages)
    {
        fseek($this->fh, 0);
        fwrite($this->fh, json_encode($messages));
    }
786644
public function security($message): void
	{
		$message = $this->logMessToArray($message);
		$this->log(array_merge(['SEVERITY' => 'SECURITY'], $message));
	}