优化数据库日志,当数据库错误时,使用本地文件日志

This commit is contained in:
augushong
2021-07-27 11:19:18 +08:00
parent f99dd0ad3c
commit 26262a53da
3 changed files with 167 additions and 8 deletions

View File

@@ -31,10 +31,14 @@ class CreateTableDebugMysql extends Migrator
{
$table = $this->table('debug_log')
->setComment('日志表')
->addColumn(ColumnFormat::timestamp('create_time'))
->addColumn(ColumnFormat::stringShort('create_time_title'))
->addColumn(ColumnFormat::stringShort('uid'))
->addColumn(ColumnFormat::stringShort('level'))
->addColumn(ColumnFormat::stringLong('content'))
->addColumn(ColumnFormat::stringShort('app_name'))
->addColumn(ColumnFormat::stringShort('controller_name'))
->addColumn(ColumnFormat::stringShort('action_name'))
->addColumn(ColumnFormat::timestamp('create_time'))
->addColumn(ColumnFormat::stringShort('create_time_title'))
->create();
}
}