|
| 1 | +<?php |
| 2 | + |
| 3 | +use Zend\Mail\Message; |
| 4 | +use Zend\Mail\Transport\InMemory; |
| 5 | +use Zend\ServiceManager\Factory\InvokableFactory; |
| 6 | + |
| 7 | +return [ |
| 8 | + |
| 9 | + 'service_manager' => [ |
| 10 | + 'factories' => [ |
| 11 | + Message::class => InvokableFactory::class, |
| 12 | + InMemory::class => InvokableFactory::class, |
| 13 | + ], |
| 14 | + ], |
| 15 | + |
| 16 | + 'db' => [ |
| 17 | + 'username' => 'root', |
| 18 | + 'password' => 'wrong_password', |
| 19 | + 'driver' => 'Pdo', |
| 20 | + 'dsn' => 'mysql:dbname=errorheromodule;host=127.0.0.1', |
| 21 | + 'driver_options' => [ |
| 22 | + PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'', |
| 23 | + ], |
| 24 | + ], |
| 25 | + |
| 26 | + 'log' => [ |
| 27 | + 'ErrorHeroModuleLogger' => [ |
| 28 | + 'writers' => [ |
| 29 | + |
| 30 | + [ |
| 31 | + 'name' => 'db', |
| 32 | + 'options' => [ |
| 33 | + 'db' => 'Zend\Db\Adapter\Adapter', |
| 34 | + 'table' => 'log', |
| 35 | + 'column' => [ |
| 36 | + 'timestamp' => 'date', |
| 37 | + 'priority' => 'type', |
| 38 | + 'message' => 'event', |
| 39 | + 'extra' => [ |
| 40 | + 'url' => 'url', |
| 41 | + 'file' => 'file', |
| 42 | + 'line' => 'line', |
| 43 | + 'error_type' => 'error_type', |
| 44 | + 'trace' => 'trace', |
| 45 | + 'request_data' => 'request_data', |
| 46 | + ], |
| 47 | + ], |
| 48 | + ], |
| 49 | + ], |
| 50 | + |
| 51 | + ], |
| 52 | + ], |
| 53 | + ], |
| 54 | + |
| 55 | + 'error-hero-module' => [ |
| 56 | + 'enable' => true, |
| 57 | + 'display-settings' => [ |
| 58 | + |
| 59 | + // excluded php errors |
| 60 | + 'exclude-php-errors' => [ |
| 61 | + E_USER_DEPRECATED |
| 62 | + ], |
| 63 | + |
| 64 | + // show or not error |
| 65 | + 'display_errors' => 0, |
| 66 | + |
| 67 | + // if enable and display_errors = 0, the page will bring layout and view |
| 68 | + 'template' => [ |
| 69 | + 'layout' => 'layout/layout', |
| 70 | + 'view' => 'error-hero-module/error-default' |
| 71 | + ], |
| 72 | + |
| 73 | + // if enable and display_errors = 0, the console will bring message |
| 74 | + 'console' => [ |
| 75 | + 'message' => 'We have encountered a problem and we can not fulfill your request. An error report has been generated and send to the support team and someone will attend to this problem urgently. Please try again later. Thank you for your patience.', |
| 76 | + ], |
| 77 | + |
| 78 | + ], |
| 79 | + 'logging-settings' => [ |
| 80 | + 'same-error-log-time-range' => 86400, |
| 81 | + ], |
| 82 | + 'email-notification-settings' => [ |
| 83 | + // set to true to activate email notification on log error |
| 84 | + 'enable' => true, |
| 85 | + |
| 86 | + // Zend\Mail\Message instance registered at service manager |
| 87 | + 'mail-message' => Message::class, |
| 88 | + |
| 89 | + // Zend\Mail\Transport\TransportInterface instance registered at service manager |
| 90 | + 'mail-transport' => InMemory::class, |
| 91 | + |
| 92 | + // email sender |
| 93 | + 'email-from' => 'Sender Name <sender@host.com>', |
| 94 | + |
| 95 | + 'email-to-send' => [ |
| 96 | + 'developer1@foo.com', |
| 97 | + 'developer2@foo.com', |
| 98 | + ], |
| 99 | + ], |
| 100 | + ], |
| 101 | +]; |
0 commit comments