teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

5

誤記を修正

2018/05/21 00:25

投稿

sakura-shi
sakura-shi

スコア93

title CHANGED
File without changes
body CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ### 実現したいこと
4
4
  1)error log出力を行いたい
5
- 2)1が櫃減できたら、Logに、stackTraceを出力したい
5
+ 2)1ができたら、次にLogに、stackTraceを出力したい
6
6
 
7
7
  application/constrollers/ErrorController.php
8
8
  ```php

4

誤記

2018/05/21 00:25

投稿

sakura-shi
sakura-shi

スコア93

title CHANGED
@@ -1,1 +1,1 @@
1
- ZendFrameWork error log 出力するは?また、logにstackTraceを出力するは?
1
+ ZendFrameWork error log 出力するは?また、logにstackTraceを出力するは?
body CHANGED
@@ -1,8 +1,8 @@
1
1
  ZendFrameWork2
2
2
 
3
3
  ### 実現したいこと
4
- 1)error log出力を行
4
+ 1)error log出力を行いたい
5
- 2)error Log出力に、stackTraceを出力したい
5
+ 2)1が櫃減できたら、Logに、stackTraceを出力したい
6
6
 
7
7
  application/constrollers/ErrorController.php
8
8
  ```php

3

コード修正

2018/05/21 00:22

投稿

sakura-shi
sakura-shi

スコア93

title CHANGED
File without changes
body CHANGED
@@ -9,10 +9,6 @@
9
9
  public function errorAction()
10
10
  {
11
11
  $errors = $this->_getParam('error_handler');
12
- if (!$errors || !$errors instanceof ArrayObject) {
13
- $this->view->message = 'You have reached the error page';
14
- return;
15
- }
16
12
  switch ($errors->type) {
17
13
  case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
18
14
  case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
@@ -27,14 +23,6 @@
27
23
  $this->view->message = 'Application error';
28
24
  break;
29
25
  }
30
- if ($log = $this->getLog()) {
31
- $log->log($this->view->message, $priority, $errors->exception);
32
- $log->log('Request Parameters', $priority, $errors->request->getParams());
33
- }
34
- if ($this->getInvokeArg('displayExceptions') == true) {
35
- $this->view->exception = $errors->exception;
36
- }
37
- $this->view->request = $errors->request;
38
26
  }
39
27
 
40
28
  ```

2

誤記修正

2018/05/18 06:51

投稿

sakura-shi
sakura-shi

スコア93

title CHANGED
File without changes
body CHANGED
@@ -6,8 +6,6 @@
6
6
 
7
7
  application/constrollers/ErrorController.php
8
8
  ```php
9
- class ErrorController extends Zend_Controller_Action
10
- {
11
9
  public function errorAction()
12
10
  {
13
11
  $errors = $this->_getParam('error_handler');
@@ -38,5 +36,5 @@
38
36
  }
39
37
  $this->view->request = $errors->request;
40
38
  }
41
- }
39
+
42
40
  ```

1

誤記修正

2018/05/18 06:30

投稿

sakura-shi
sakura-shi

スコア93

title CHANGED
File without changes
body CHANGED
@@ -38,4 +38,5 @@
38
38
  }
39
39
  $this->view->request = $errors->request;
40
40
  }
41
+ }
41
42
  ```