{"id":20275527,"url":"https://github.com/workofstan/seablast-logger","last_synced_at":"2025-10-26T02:18:49.001Z","repository":{"id":248185582,"uuid":"825068441","full_name":"WorkOfStan/seablast-logger","owner":"WorkOfStan","description":"A PSR-3 compliant logger with adjustable verbosity.","archived":false,"fork":false,"pushed_at":"2025-10-04T12:24:52.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-19T12:35:40.271Z","etag":null,"topics":["logger","psr-3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WorkOfStan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-06T17:16:53.000Z","updated_at":"2025-10-04T12:23:59.000Z","dependencies_parsed_at":"2024-07-27T12:22:47.842Z","dependency_job_id":"542cdceb-ffae-43ac-bb76-13def946f659","html_url":"https://github.com/WorkOfStan/seablast-logger","commit_stats":null,"previous_names":["workofstan/seablast-logger"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/WorkOfStan/seablast-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fseablast-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fseablast-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fseablast-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fseablast-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WorkOfStan","download_url":"https://codeload.github.com/WorkOfStan/seablast-logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fseablast-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281047753,"owners_count":26435127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logger","psr-3"],"created_at":"2024-11-14T13:09:43.793Z","updated_at":"2025-10-26T02:18:48.967Z","avatar_url":"https://github.com/WorkOfStan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# seablast-logger\n\nA [PSR-3](http://www.php-fig.org/psr/psr-3/) compliant logger with adjustable verbosity.\n\nThe logging level verbosity can be tailored to suit different environments.\nFor instance, in a development environment, the logger can be configured to log more detailed information compared to a production environment, all without changing your code.\nSimply adjust the verbosity.\n\nThe `logging_level` is the most important setting. These parameters can be configured when instantiating the logger:\n\n```php\nuse Seablast\\Logger\\Logger;\n$conf = array(\n    // THESE ARE THE DEFAULT SETTINGS\n    // 0 = send message to PHP's system logger; recommended is however 3, i.e. append to the file destination set in the field 'logging_file'\n    Logger::CONF_ERROR_LOG_MESSAGE_TYPE =\u003e 0,\n    // if error_log_message_type equals 3, the message is appended to this file destination (path and name)\n    Logger::CONF_LOGGING_FILE =\u003e '',\n    // verbosity: log up to the level set here, default=5 = debug\n    Logger::CONF_LOGGING_LEVEL =\u003e 5,\n    // rename or renumber, if needed\n    Logger::CONF_LOGGING_LEVEL_NAME =\u003e array(0 =\u003e 'unknown', 1 =\u003e 'fatal', 'error', 'warning', 'info', 'debug', 'speed'),\n    // the logging level to which the page generation speed (i.e. error_number 6) is to be logged\n    Logger::CONF_LOGGING_LEVEL_PAGE_SPEED =\u003e 5,\n    // false =\u003e use logging_file with log extension as destination; true =\u003e adds .Y-m.log to the logging file\n    Logger::CONF_LOG_MONTHLY_ROTATION =\u003e true,\n    // prefix message that took longer than profiling step (float) sec from the previous one by SLOWSTEP\n    Logger::CONF_LOG_PROFILING_STEP =\u003e false,\n    // fatal error may just be written in log, on production, it is however recommended to set an e-mail, where to announce fatal errors\n    Logger::CONF_MAIL_FOR_ADMIN_ENABLED =\u003e false,\n);\n$logger = new Logger($conf);\n```\n\nSee [test.php](test.php) for usage.\n\nBy default the logger logs the following levels of information:\n\n- fatal\n- error\n- warning\n- info\n- debug\n\nAnd ignores\n\n- speed\n\nNote: Outputting log messages to the screen is not supported.\n\n## Runtime adjustment\n\n- method logAtLeastToLevel(int $level) may change the verbosity level above the level set when instatiating.\n- method setUser(int|string $user) may add the user identification to the error messages\n\n## Tracy\\Logger::log wrapper\n\nSince Nette\\Tracy::v2.6.0, i.e. `\"php\": \"\u003e=7.1\"` it is possible to use a PSR-3 adapter, allowing for integration of [seablast/logger](https://github.com/WorkOfStan/seablast-logger).\n\n```php\n$logger = new \\Seablast\\Logger\\Logger();\n$tracyLogger = new \\Tracy\\Bridges\\Psr\\PsrToTracyLoggerAdapter($logger);\nDebugger::setLogger($tracyLogger);\nDebugger::enable();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkofstan%2Fseablast-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkofstan%2Fseablast-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkofstan%2Fseablast-logger/lists"}