BasicLogger.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /**
  3. * This file is part of the Propel package.
  4. * For the full copyright and license information, please view the LICENSE
  5. * file that was distributed with this source code.
  6. *
  7. * @license MIT License
  8. */
  9. /**
  10. * This is a minimalistic interface that any logging class must implement for Propel.
  11. *
  12. * The API for this interface is based on the PEAR::Log interface. It provides a simple
  13. * API that can be used by Propel independently of Log backend.
  14. *
  15. * PEAR::Log and perhaps the Log API was developed by Chuck Hagenbuch <chuck@horde.org>
  16. * and Jon Parise <jon@php.net>.
  17. *
  18. * @author Hans Lellelid <hans@xmpl.org>
  19. * @version $Revision: 1612 $
  20. * @package propel.runtime.logger
  21. */
  22. interface BasicLogger
  23. {
  24. /**
  25. * A convenience function for logging an alert event.
  26. *
  27. * @param mixed $message String or Exception object containing the message
  28. * to log.
  29. */
  30. public function alert($message);
  31. /**
  32. * A convenience function for logging a critical event.
  33. *
  34. * @param mixed $message String or Exception object containing the message
  35. * to log.
  36. */
  37. public function crit($message);
  38. /**
  39. * A convenience function for logging an error event.
  40. *
  41. * @param mixed $message String or Exception object containing the message
  42. * to log.
  43. */
  44. public function err($message);
  45. /**
  46. * A convenience function for logging a warning event.
  47. *
  48. * @param mixed $message String or Exception object containing the message
  49. * to log.
  50. */
  51. public function warning($message);
  52. /**
  53. * A convenience function for logging an critical event.
  54. *
  55. * @param mixed $message String or Exception object containing the message
  56. * to log.
  57. */
  58. public function notice($message);
  59. /**
  60. * A convenience function for logging an critical event.
  61. *
  62. * @param mixed $message String or Exception object containing the message
  63. * to log.
  64. */
  65. public function info($message);
  66. /**
  67. * A convenience function for logging a debug event.
  68. *
  69. * @param mixed $message String or Exception object containing the message
  70. * to log.
  71. */
  72. public function debug($message);
  73. /**
  74. * Primary method to handle logging.
  75. *
  76. * @param mixed $message String or Exception object containing the message
  77. * to log.
  78. * @param int $severity The numeric severity. Defaults to null so that no
  79. * assumptions are made about the logging backend.
  80. */
  81. public function log($message, $severity = null);
  82. }