Configuration
1 year ago
ApiLogger.php
1 year ago
ConsoleLogger.php
1 year ago
LoggerConstants.php
1 year ago
NullApiLogger.php
1 year ago
LoggerConstants.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Core\Logger; |
| 4 | |
| 5 | use Psr\Log\LogLevel; |
| 6 | |
| 7 | class LoggerConstants |
| 8 | { |
| 9 | public const NON_SENSITIVE_HEADERS = [ |
| 10 | "Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language", |
| 11 | "Access-Control-Allow-Origin", "Cache-Control", "Connection", |
| 12 | "Content-Encoding", "Content-Language", "Content-Length", "Content-Location", |
| 13 | "Content-MD5", "Content-Range", "Content-Type", "Date", "ETag", "Expect", |
| 14 | "Expires", "From", "Host", "If-Match", "If-Modified-Since", "If-None-Match", |
| 15 | "If-Range", "If-Unmodified-Since", "Keep-Alive", "Last-Modified", "Location", |
| 16 | "Max-Forwards", "Pragma", "Range", "Referer", "Retry-After", "Server", |
| 17 | "Trailer", "Transfer-Encoding", "Upgrade", "User-Agent", "Vary", "Via", |
| 18 | "Warning", "X-Forwarded-For", "X-Requested-With", "X-Powered-By" |
| 19 | ]; |
| 20 | public const ALLOWED_LOG_LEVELS = [ |
| 21 | LogLevel::EMERGENCY, LogLevel::ALERT, LogLevel::CRITICAL, LogLevel::ERROR, |
| 22 | LogLevel::WARNING, LogLevel::NOTICE, LogLevel::INFO, LogLevel::DEBUG |
| 23 | ]; |
| 24 | public const METHOD = 'method'; |
| 25 | public const URL = 'url'; |
| 26 | public const HEADERS = 'headers'; |
| 27 | public const BODY = 'body'; |
| 28 | public const STATUS_CODE = 'statusCode'; |
| 29 | public const CONTENT_LENGTH = 'contentLength'; |
| 30 | public const CONTENT_TYPE = 'contentType'; |
| 31 | public const CONTENT_LENGTH_HEADER = 'content-length'; |
| 32 | public const CONTENT_TYPE_HEADER = 'content-type'; |
| 33 | } |
| 34 |