rev. 33 for log

This commit is contained in:
Visman 2021-01-17 21:03:03 +07:00
parent 2891f8fc78
commit 6cc0906b2b
4 changed files with 38 additions and 3 deletions

1
.gitignore vendored
View file

@ -5,6 +5,7 @@
/app/config/_*
/app/cache/**/*.php
/app/cache/**/*.lock
/app/log/**
/public/img/avatars/*
/public/.htaccess
/public/index.php

View file

@ -1249,6 +1249,31 @@ class Update extends Admin
$coreConfig->save();
return null;
}
/**
* rev.32 to rev.33
*/
protected function stageNumber32(array $args): ?int
{
$coreConfig = new CoreConfig($this->c->DIR_CONFIG . '/' . self::CONFIG_FILE);
$coreConfig->add(
'shared=>Log',
[
'class' => '\ForkBB\Core\Log::class',
'config' => [
'path' => '\'%DIR_LOG%/{Y-m-d}.log\'',
'lineFormat' => '"\\\\%datetime\\\\% [\\\\%level_name\\\\%] \\\\%message\\\\%\\t\\\\%context\\\\%\\n"',
'timeFormat' => '\'Y-m-d H:i:s\'',
],
],
'NormEmail'
);
$coreConfig->save();
return null;
}
}

View file

@ -50,7 +50,7 @@ if (
}
$c->PUBLIC_URL = $c->BASE_URL . $forkPublicPrefix;
$c->FORK_REVISION = 32;
$c->FORK_REVISION = 33;
$c->START = $forkStart;
$c->DIR_APP = __DIR__;
$c->DIR_PUBLIC = $forkPublic;
@ -58,6 +58,7 @@ $c->DIR_CONFIG = __DIR__ . '/config';
$c->DIR_CACHE = __DIR__ . '/cache';
$c->DIR_VIEWS = __DIR__ . '/templates';
$c->DIR_LANG = __DIR__ . '/lang';
$c->DIR_LOG = __DIR__ . '/log';
$c->DATE_FORMATS = ['Y-m-d', 'd M Y', 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'];
$c->TIME_FORMATS = ['H:i:s', 'H:i', 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'];

View file

@ -109,9 +109,17 @@ return [
'ssl' => '%config.o_smtp_ssl%',
'eol' => '%EOL%',
],
'Func' => \ForkBB\Core\Func::class,
'Test' => \ForkBB\Core\Test::class,
'Func' => \ForkBB\Core\Func::class,
'Test' => \ForkBB\Core\Test::class,
'NormEmail' => \MioVisman\NormEmail\NormEmail::class,
'Log' => [
'class' => \ForkBB\Core\Log::class,
'config' => [
'path' => '%DIR_LOG%/{Y-m-d}.log',
'lineFormat' => "\\%datetime\\% [\\%level_name\\%] \\%message\\%\t\\%context\\%\n",
'timeFormat' => 'Y-m-d H:i:s',
],
],
'config' => '@ConfigModel:init',
'bans' => '@BanListModel:init',