RotatingFileHandler.php 754 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Monolog package.
  4. *
  5. * (c) Jordi Boggiano <j.boggiano@seld.be>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Monolog\Handler;
  11. /**
  12. * Stores logs to files that are rotated every n day/week/month
  13. *
  14. * @author Jordi Boggiano <j.boggiano@seld.be>
  15. */
  16. class RotatingFileHandler extends StreamHandler
  17. {
  18. protected $rotation;
  19. protected $maxAge;
  20. public function close()
  21. {
  22. parent::close();
  23. // TODO rotation
  24. }
  25. public function setRotation($rotation)
  26. {
  27. $this->rotation = $rotation;
  28. }
  29. public function setMaxAge($maxAge)
  30. {
  31. $this->maxAge = $maxAge;
  32. }
  33. }