{"id":18996051,"url":"https://github.com/00f100/fcphp-log","last_synced_at":"2026-04-16T08:30:20.655Z","repository":{"id":56893985,"uuid":"137421460","full_name":"00F100/fcphp-log","owner":"00F100","description":"Package to manipulate log application","archived":false,"fork":false,"pushed_at":"2019-03-05T05:01:56.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T16:26:32.953Z","etag":null,"topics":["fcphp","fcphp-log","log","logger","php7"],"latest_commit_sha":null,"homepage":null,"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/00F100.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-15T00:09:24.000Z","updated_at":"2019-03-27T16:47:18.000Z","dependencies_parsed_at":"2022-08-21T01:20:15.959Z","dependency_job_id":null,"html_url":"https://github.com/00F100/fcphp-log","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/00F100","download_url":"https://codeload.github.com/00F100/fcphp-log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240010504,"owners_count":19733514,"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","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":["fcphp","fcphp-log","log","logger","php7"],"created_at":"2024-11-08T17:33:46.529Z","updated_at":"2026-04-16T08:30:20.616Z","avatar_url":"https://github.com/00F100.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FcPhp Log\n\nPackage to manipulate logs of application FcPhp\n\n[![Build Status](https://travis-ci.org/00F100/fcphp-log.svg?branch=master)](https://travis-ci.org/00F100/fcphp-log) [![codecov](https://codecov.io/gh/00F100/fcphp-log/branch/master/graph/badge.svg)](https://codecov.io/gh/00F100/fcphp-log) [![Total Downloads](https://poser.pugx.org/00F100/fcphp-log/downloads)](https://packagist.org/packages/00F100/fcphp-log)\n\n## How to install\n\nComposer:\n\n```sh\n$ composer require 00f100/fcphp-log\n```\n\nor add in composer.json\n\n```json\n{\n    \"require\": {\n        \"00f100/fcphp-log\": \"*\"\n    }\n}\n```\n\n## How to use\n\nCreate logs easy! If `$debug = false` in constructor, just `$log-\u003eerror()` and `$log-\u003ewarning()` works...\n\n```php\n\u003c?php\n\nuse \\FcPhp\\Log\\Log;\n\n/*\n\n    Method to return instance of Log\n    \n    @param string $directoryOutput Directory to write logs\n    @param string|bool $dateFormat Format of date to print log. If `false` not print date\n    @param string $extension Extension of file log\n    @param bool $debug Enable debug mode\n    @return FcPhp\\Log\\Interfaces\\ILog\n\n    Log::getInstance(string $directoryOutput, $dateFormat = 'Y-m-d H:i:s', string $extension = 'log', bool $debug = false) :ILog\n\n*/\n\n$log = Log::getInstance('var/log', 'Y-m-d H:i:s', 'log', true);\n\n// To error logs\n$log-\u003eerror('message of error');\n// Print log: var/log/error.log\n// [2018-06-16 04:06:25] message of error\n\n// To warning logs\n$log-\u003ewarning('message of warning');\n// Print log: var/log/warning.log\n// [2018-06-16 04:06:25] message of warning\n\n// To debug\n$log-\u003edebug('message debug');\n// Print log: var/log/debug.log\n// [2018-06-16 04:06:25] message debug\n\n// To many types\n$log-\u003efooBar('message foo bar');\n// Print log: var/log/fooBar.log\n// [2018-06-16 04:06:25] message foo bar\n\n```\n\n### Custom format log\n\n```php\n\u003c?php\n\nuse \\FcPhp\\Log\\Log;\n\n$log = Log::getInstance('var/log', 'Y-m-d H:i:s', 'log', true);\n\n$log-\u003ecustomLog(function(string $dateTime, string $logText, string $breakLine) {\n    return $logText . ' ' . $dateTime . $breakLine;\n});\n\n$log-\u003eerror('Custom message, custom format');\n// Print log: var/log/error.log\n// Custom message, custom format [2018-06-16 04:06:25]\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F00f100%2Ffcphp-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F00f100%2Ffcphp-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F00f100%2Ffcphp-log/lists"}