尊龙凯时人生就是博

laravelɨ³ýËùÓÐÈÕÖ¾

laravelÊÇÒ»¸öÓÅÒìµÄphp¿ò¼Ü £¬ËüÌṩÁËÒ»¸öÎÞаµÄÈÕ־ϵͳ £¬¿ÉÒԼͼӦÓóÌÐòÖб¬·¢µÄÖÖÖÖÊÂÎñ¡£¿ÉÊÇ £¬³¤Ê±¼äµÄÈÕÖ¾¼Í¼¿ÉÄܻᵼÖÂÈÕÖ¾Îļþ¹ý´ó £¬Õ¼ÓôÅÅÌ¿Õ¼ä £¬Ó°ÏìЧÀÍÆ÷ÐÔÄÜ¡£ÔÚÕâÖÖÇéÐÎÏ £¬ÎÒÃÇÐèҪɨ³ýËùÓÐÈÕÖ¾ÎļþÀ´ÊÍ·Å´ÅÅ̿ռ䡣±¾ÎĽ«ÏÈÈÝÔõÑùɨ³ýlaravelÖеÄËùÓÐÈÕÖ¾Îļþ¡£

È·¶¨ÈÕÖ¾Îļþ·¾¶

ÔÚLaravelÖÐ £¬ËùÓеÄÈÕÖ¾Îļþ¶¼ÉúÑÄÔÚstorage/logsĿ¼Ï¡£

ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÕÒµ½ÈÕÖ¾Îļþ·¾¶£º

php artisan config:cache
php artisan config:clear
php artisan config:cache
php artisan config:clear

µÇ¼ºó¸´ÖÆ

ÕâÑù×öµÄÄ¿µÄÊÇÈ·±£LaravelµÄÉèÖñ»×¼È·¼ÓÔØ¡£

È»ºó £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÕÒµ½ÈÕÖ¾Îļþ·¾¶£º

php artisan tinker

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÔÚTinkerÖÐ £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´È·¶¨ÈÕÖ¾Îļþ·¾¶£º

use IlluminateSupportFacadesLog;
Log::getLogger()->getHandlers()[0]->getUrl();

µÇ¼ºó¸´ÖÆ

ÕâÑù¾Í¿ÉÒÔÔÚTinkerÖлñÈ¡ÈÕÖ¾Îļþ·¾¶¡£¸´ÖƲ¢ÉúÑÄ·¾¶ÒÔ±¸ºóÓá£

ɨ³ýÈÕÖ¾Îļþ

ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´É¨³ýËùÓÐÈÕÖ¾Îļþ£º

php artisan tinker

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÔÚTinkerÖÐ £¬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´É¨³ýËùÓÐÈÕÖ¾Îļþ£º

use IlluminateSupportFacadesFile;
File::cleanDirectory('/path/to/logs');

µÇ¼ºó¸´ÖÆ

×¢ÖØÌæ»»/path/to/logsΪÄãÉúÑĵÄÈÕÖ¾Îļþ·¾¶¡£

ÕâÑù¾Í¿ÉÒÔɨ³ýLaravelÖÐËùÓеÄÈÕÖ¾Îļþ¡£ÈôÊÇÄúÖ»Ïëɨ³ýÌض¨ÈÕÆÚµÄÈÕÖ¾ £¬¿ÉÒÔʹÓÃÒÔÏÂÓï·¨£¨ÀýÈç £¬É¾³ý2021Äê1ÔµÄÈÕÖ¾£©£º

use IlluminateSupportFacadesFile;
File::cleanDirectory('/path/to/logs', 31, '2021-01-');

µÇ¼ºó¸´ÖÆ

×¢ÖØÌæ»»/path/to/logsΪÄãµÄÈÕÖ¾Îļþ·¾¶ £¬31ÊÇÔ²Õûµ½ÖÜÄ©µÄÌìÊý £¬2021-01-ÊÇÄãÏëɾ³ýµÄÈÕÖ¾ÈÕÆÚ¡£

×Ô¶¯°´ÆÚɨ³ýÈÕÖ¾

ÊÖ¶¯É¨³ýËùÓÐÈÕÖ¾Îļþ¿ÉÄÜ»áºÜƶÀ§ £¬ÓÉÓÚÄúÐèÒª¾­³£Ö´Ðд˲Ù×÷¡£ÎªÁË×èÖ¹ÕâÖÖÇéÐÎ £¬ÎÒÃÇ¿ÉÒÔÉèÖÃÍýÏëʹÃüÀ´×Ô¶¯É¨³ýÈÕÖ¾Îļþ¡£

±à¼­Ð§ÀÍÆ÷ÉϵÄcrontabÎļþ £¬Ìí¼ÓÒÔÏÂÐУº

0 0 * * * php /path/to/artisan log:clear > /dev/null 2>&1

µÇ¼ºó¸´ÖÆ

Õ⽫ÔÚÌìÌìÎçÒ¹×Ô¶¯É¨³ýËùÓÐÈÕÖ¾¡£Ìæ»»/path/to/artisanΪÄãµÄartisanÎļþ·¾¶¡£

×ܽá

ÔÚ±¾ÎÄÖÐ £¬ÎÒÃÇÏÈÈÝÁËÔõÑùɨ³ýLaravelÖеÄËùÓÐÈÕÖ¾Îļþ¡£Äú¿ÉÒÔÊÖ¶¯É¨³ý»òÉèÖÃÍýÏëʹÃüÀ´°´ÆÚɨ³ýÈÕÖ¾¡£Õ⽫ïÔÌ­´ÅÅÌ¿Õ¼äµÄʹÓà £¬Ìá¸ßЧÀÍÆ÷ÐÔÄÜ¡£

ÒÔÉϾÍÊÇlaravelɨ³ýËùÓÐÈÕÖ¾µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ