Skip to content

Commit

Permalink
update: update deps version, add some scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed May 11, 2022
1 parent 119d1f6 commit 72c3646
Show file tree
Hide file tree
Showing 6 changed files with 258 additions and 126 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ kite --auto-completion \

### 常用命令组别名

推荐配置常用命令组别名,这样可以快速使用常用的命令组。
推荐配置常用命令组别名到 `~/.bashrc` 或者 `~/.zshrc`,这样可以快速使用常用的命令组。

```bash
## aliases for kite
# NOTICE: zsh plugin support add aliases
#alias kj="kite jump"
alias kj="kite jump"
alias kg="kite git"
alias kgit="kite git"
alias kgl="kite gitlab"
Expand Down
12 changes: 6 additions & 6 deletions app/Common/Log/CliLogProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Inhere\Kite\Common\Log;

use Inhere\Kite\Kite;
use Monolog\LogRecord;
use Monolog\Processor\ProcessorInterface;
use Toolkit\Stdlib\OS;

Expand All @@ -15,18 +16,17 @@
class CliLogProcessor implements ProcessorInterface
{
/**
* @return array The processed record
* @param LogRecord $record
*
* @psalm-param Record $record
* @psalm-return Record
* @return LogRecord The processed record
*/
public function __invoke(array $record)
public function __invoke(LogRecord $record): LogRecord
{
$workDir = Kite::cliApp()->getInput()->getWorkDir();

// add to log
$record['extra']['OSName'] = OS::name();
$record['extra']['workDir'] = $workDir;
$record->extra['OSName'] = OS::name();
$record->extra['workDir'] = $workDir;

return $record;
}
Expand Down
Loading

0 comments on commit 72c3646

Please sign in to comment.