ͰɺϩάͷྫΛ͔͍͜͠AI܅ʹͩͯ͠Β͍·ͨ͠ʂ
— Failed to connect to the database server
— Incorrect username or password
— The requested resource could not be found
— You do not have permission to access this resource
— The user exceeded the rate limit for this resource
Slide 20
Slide 20 text
ԶͳΒApproveͤΜͧ
— ʮThisͬͯͳʹʁɺThe userͬͯ୭ʁʯ
— ରԠ͢ΔͨΊͷใ͕ͨΓͳ͍
— ϦΫΤετIDͱ͔ɺϩάΠϯϢʔβʔͱ͔ͦ͏͍͏ͷೖΕͨํ͕ྑ͍
- {ͳΜΒ͔ΞΠςϜ} could not be found
- UID:234 does not have permission to access resource_id: abc
- UID:123 exceeded the rate limit for resource: def
— ͨͩ͠ɺେྔʹϩά͕Ͱ͓ͯΓɺͦΕͷूΛ͍ͯ͠Δ߹രൃతʹ૿͑Δ͜ͱ͕͋Δ
(·͋ɺͦΕઌʹͨ͠ํ͕ྑ͍ͷͰ…)
> Error: Error
ͳʹ͕Τϥʔͳͷʁʁʁ
> Error: User Information update.
…Ͳ͜Ͱʁ୭͕ʁ
> Error: User update fail. user_id: 1
͏ʔΜ…͜ͷϝοηʔδɺͲ͜ͷॴ͚ͩͬͳ…શจݕࡧ͠Α͏͔…ʁ·͋໘͔ͩΒΈͳ͔ͬͨ͜ͱʹ͢Δ͔ʁ
> Error: User update fail. user_id: 1 on /path/to/Some.php:123
;ʔΜɺ͜ͷϑΝΠϧ͔…ͳΜͱͳ͘Θ͔Γͦ͏ͩͳ…Ͱ·͋ݟͳ͔ͬͨ͜ͱʹ͍͍ͯ͠ͷ͔Θ͔ΒΜͳ
> Emerg: Update user order record fail. user_id: 1 on /path/to/Some.php:123
Emergʁͬͯ͜ͱக໋తΤϥʔ͔ʂͩΕ͔͜ΕͲ͏͢Ε͍͍͔ͬͯ͠ΔʁͱΓ͋͑ͣίʔυಡΜͰௐࠪ͢Δ͔…ʂ
> Emerg: Update user order record fail. user_id: 1 on /path/to/Some.php:123 see OpDoc:ABC123
க໋తΤϥʔͩʂDocΈͯΈΑ͏ʂ…ͳΔ΄Ͳ·ͣCR͞Μʹ࿈བྷ͔ɺϢʔβʔ͠ΒͯୈҰใʂͦͷޙӡ༻ͰΧόʔ͔ʂ
class SomeFeature{
public function __construct(Logger $logger){}
public function run();
}
// == in prod
$log = new Logger('slack_logger');
$log->pushHandler(new StreamHandler('path/to/log'));
$log->pushHandler(new SlackWebhookHandler($slackWebhookUrl));
$some = new SomeFeature($log); // SlackͱϑΝΠϧʹอଘ
// == in tests
$log = new Logger('null_logger');
$log->pushHandler(new NullHandler());
$some = new SomeFeature($log); // ڏۭʹফ͑Δ