ユーザ用ツール

サイト用ツール


サイドバー



最近の更新



Tag Cloud

タグ#
6
10
1
3
1
2
17
7
1
1
6
9
4
1
2
182
1
4
2
7
14
5
1
25
2
3
1
6
1
1
33
1
3
3
1
1
1
1
1
1
13
45
7
9
10
5
10
3
2
2
8
2
2
6
3
1
1
4
7
4
2
2
2
1
7
2
4
1
3
24
2
12
2
3
1
1
2
2
1
1
1
4
2
2
4
2
2
1
1
2
1
1
1
2
1
26
2
1
2
2
2
1
1
2
3
12
4
7
1
1
2
9
1
3
1
1
7
1
1
1
1
1
8
1
4
2
1
1
1
3
3
5
1
2
1
1
7
3
1
10
1
1
4
1
2
1
2
7
2
1
3
1
1
3
1
2
1
2
2
2
1
2
3
1
1
3
2
1
3
1
3
3
2
1
1
7
1
3
3
1
1
1
1
5
1
27
2
1
2
1
2
2
3
1
1
1
2
1
2
1
1
1
3
1
1
1
2
2
2
1
1
1

11_php:02_framework:03_silex_monolog

03 Silex Monolog

use Silex\Provider\MonologServiceProvider;
$app->register(new Silex\Provider\MonologServiceProvider(), array(
  'monolog.name' => 'AAAA',
  'monolog.logfile' => __DIR__.'/log/my_app.log',
  'monolog.maxfiles' => 7,
  'monolog.level' => constant("Monolog\Logger::DEBUG"),
));

// ログ書き込み
$app['monolog']->addDebug('debug log');
$app['monolog']->addInfo('info log');
$app['monolog']->addWarning('warning log');
$app['monolog']->addError('error log');

出力されるログ

[2019-02-07 11:47:15] AAAA.DEBUG: debug log [] []
[2019-02-07 11:47:15] AAAA.INFO: info log [] []
[2019-02-07 11:47:15] AAAA.WARNING: warning log [] []
[2019-02-07 11:47:15] AAAA.ERROR: error log [] []
11_php/02_framework/03_silex_monolog.txt · 最終更新: 2019/02/07 11:51 by matsui

Yesterday:275 Today:170 Total:13311