rev.34 for LogViewer
This commit is contained in:
parent
86ac224e14
commit
2827aace31
3 changed files with 44 additions and 2 deletions
|
@ -1260,7 +1260,7 @@ class Update extends Admin
|
|||
$coreConfig->add(
|
||||
'shared=>Log',
|
||||
[
|
||||
'class' => '\ForkBB\Core\Log::class',
|
||||
'class' => '\\ForkBB\\Core\\Log::class',
|
||||
'config' => [
|
||||
'path' => '\'%DIR_LOG%/{Y-m-d}.log\'',
|
||||
'lineFormat' => '"\\\\%datetime\\\\% [\\\\%level_name\\\\%] \\\\%message\\\\%\\t\\\\%context\\\\%\\n"',
|
||||
|
@ -1272,6 +1272,38 @@ class Update extends Admin
|
|||
|
||||
$coreConfig->save();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* rev.33 to rev.34
|
||||
*/
|
||||
protected function stageNumber33(array $args): ?int
|
||||
{
|
||||
$coreConfig = new CoreConfig($this->configFile);
|
||||
|
||||
$coreConfig->add(
|
||||
'shared=>LogViewer',
|
||||
[
|
||||
'class' => '\\ForkBB\\Core\\LogViewer::class',
|
||||
'config' => [
|
||||
'dir' => '\'%DIR_LOG%\'',
|
||||
'pattern' => '\'*.log\'',
|
||||
'lineFormat' => '"\\\\%datetime\\\\% [\\\\%level_name\\\\%] \\\\%message\\\\%\\t\\\\%context\\\\%\\n"',
|
||||
],
|
||||
'cache' => '\'%Cache%\'',
|
||||
],
|
||||
'Log'
|
||||
);
|
||||
|
||||
$coreConfig->add(
|
||||
'multiple=>AdminLogs',
|
||||
'\\ForkBB\\Models\\Pages\\Admin\\Logs::class',
|
||||
'AdminParserBBCode'
|
||||
);
|
||||
|
||||
$coreConfig->save();
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ if (
|
|||
}
|
||||
$c->PUBLIC_URL = $c->BASE_URL . $forkPublicPrefix;
|
||||
|
||||
$c->FORK_REVISION = 33;
|
||||
$c->FORK_REVISION = 34;
|
||||
$c->START = $forkStart;
|
||||
$c->DIR_APP = __DIR__;
|
||||
$c->DIR_PUBLIC = \realpath(__DIR__ . '/../public');
|
||||
|
|
|
@ -120,6 +120,15 @@ return [
|
|||
'timeFormat' => 'Y-m-d H:i:s',
|
||||
],
|
||||
],
|
||||
'LogViewer' => [
|
||||
'class' => \ForkBB\Core\LogViewer::class,
|
||||
'config' => [
|
||||
'dir' => '%DIR_LOG%',
|
||||
'pattern' => '*.log',
|
||||
'lineFormat' => "\\%datetime\\% [\\%level_name\\%] \\%message\\%\t\\%context\\%\n",
|
||||
],
|
||||
'cache' => '%Cache%',
|
||||
],
|
||||
|
||||
'config' => '@ConfigModel:init',
|
||||
'bans' => '@BanListModel:init',
|
||||
|
@ -250,6 +259,7 @@ return [
|
|||
'AdminParser' => \ForkBB\Models\Pages\Admin\Parser\Edit::class,
|
||||
'AdminParserSmilies' => \ForkBB\Models\Pages\Admin\Parser\Smilies::class,
|
||||
'AdminParserBBCode' => \ForkBB\Models\Pages\Admin\Parser\BBCode::class,
|
||||
'AdminLogs' => \ForkBB\Models\Pages\Admin\Logs::class,
|
||||
|
||||
'ConfigModel' => \ForkBB\Models\Config\Model::class,
|
||||
'ConfigModelLoad' => \ForkBB\Models\Config\Load::class,
|
||||
|
|
Loading…
Add table
Reference in a new issue