{"id":13720820,"url":"https://github.com/aleron75/magemonolog","last_synced_at":"2025-05-07T13:30:38.530Z","repository":{"id":149563040,"uuid":"24836694","full_name":"aleron75/magemonolog","owner":"aleron75","description":"A Magento extension which provides a custom writer model to transparently use Monolog as logging library","archived":false,"fork":false,"pushed_at":"2017-05-01T15:44:03.000Z","size":25,"stargazers_count":24,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-04T01:13:54.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aleron75.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-10-06T07:06:08.000Z","updated_at":"2023-08-31T16:41:43.000Z","dependencies_parsed_at":"2024-01-06T00:43:29.120Z","dependency_job_id":"6550b86f-cde6-4a4b-a4e8-7e370d8c1c07","html_url":"https://github.com/aleron75/magemonolog","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleron75%2Fmagemonolog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleron75%2Fmagemonolog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleron75%2Fmagemonolog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleron75%2Fmagemonolog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleron75","download_url":"https://codeload.github.com/aleron75/magemonolog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224604586,"owners_count":17339166,"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":[],"created_at":"2024-08-03T01:01:08.433Z","updated_at":"2024-11-14T10:30:36.394Z","avatar_url":"https://github.com/aleron75.png","language":"PHP","funding_links":[],"categories":["Extensions"],"sub_categories":["Free"],"readme":"magemonolog\n===========\n\nFacts\n-----\nVersion: 0.2.2\nDeveloped (and tested) on Magento CE v 1.8.1.0\n\nIntroduction\n------------\n\nA Magento extension which provides a custom writer model to transparently use \nMonolog as logging library.\n\nThe following Monolog's Handlers are supported at the moment:\n\n* `StreamHandler` - writes to file\n* `NativeMailHandler` - sends each log entry via email\n* `NewRelicHandler` - logs in NewRelic app\n\nInstallation\n------------\n\nYou can install this extension in several ways:\n\n**Download**\n\nDownload the full package, copy the content of the `app` directory\nin your Magento base directory; pay attention not to overwrite\nthe `app` folder, only merge its contents into existing directory;\n\n**Modman**\n\nInstall modman Module Manager: https://github.com/colinmollenhour/modman\n\nAfter having installed modman on your system, you can clone this module on your\nMagento base directory by typing the following command:\n\n    $ modman init\n    $ modman clone git@github.com:aleron75/magemonolog.git\n\n**Composer**\n\nInstall composer: http://getcomposer.org/download/\n\nInstall Magento Composer: https://github.com/magento-hackathon/magento-composer-installer\n\nType the following command:\n\n    $ php composer.phar require aleron75/magemonolog:dev-master\n\nor\n\n    $ composer require aleron75/magemonolog:dev-master\n\n**Common tasks**\n\nAfter installation:\n\n* if you have cache enabled, disable or refresh it;\n* if you have compilation enabled, disable it or recompile the code base.\n\nUsage example\n-------------\nOnce installed, the module automatically replaces the default Magento Log Writer\nwith Monolog's StreamHandler.\n\nThis is obtained through the following config node in `config.xml`:\n\n    \u003cconfig\u003e\n        \u003cglobal\u003e\n            \u003clog\u003e\n                \u003ccore\u003e\n                    \u003cwriter_model\u003eAleron75_Magemonolog_Model_Logwriter\u003c/writer_model\u003e\n                \u003c/core\u003e\n            \u003c/log\u003e\n        \u003c/global\u003e\n    \u003c/config\u003e\n\nwhich instructs Magento to use a custom log writer class when logging via the\n`Mage::log()` native static function.\n\nThe configured `Aleron75_Magemonolog_Model_Logwriter` class is a wrapper for\nMonolog and allows to use Monolog's Handlers.\n\nMonolog's Handlers are configured in the `config.xml` through the following\nconfig node:\n\n    \u003cconfig\u003e\n        \u003cdefault\u003e\n            \u003cmagemonolog\u003e\n                \u003chandlers\u003e\n                    \u003cStreamHandler\u003e\n                        \u003cactive\u003e1\u003c/active\u003e\n                        \u003cparams\u003e\n                            \u003cstream\u003emagemonolog.log\u003c/stream\u003e\n                            \u003clevel\u003eDEBUG\u003c/level\u003e\n                            \u003cbubble\u003etrue\u003c/bubble\u003e\n                            \u003cfilePermission\u003enull\u003c/filePermission\u003e\n                            \u003cuseLocking\u003efalse\u003c/useLocking\u003e\n                        \u003c/params\u003e\n                    \u003c/StreamHandler\u003e\n                    \u003cNativeMailHandler\u003e\n                        \u003cactive\u003e0\u003c/active\u003e\n                        \u003cparams\u003e\n                            \u003cto\u003edummy@example.com\u003c/to\u003e\n                            \u003csubject\u003eLog\u003c/subject\u003e\n                            \u003cfrom\u003edummy@example.com\u003c/from\u003e\n                            \u003clevel\u003eERROR\u003c/level\u003e\n                            \u003cbubble\u003etrue\u003c/bubble\u003e\n                            \u003cmaxColumnWidth\u003e70\u003c/maxColumnWidth\u003e\n                        \u003c/params\u003e\n                    \u003c/NativeMailHandler\u003e\n                    \u003cNewRelicHandler\u003e\n                        \u003cactive\u003e0\u003c/active\u003e\n                        \u003cparams\u003e\n                            \u003clevel\u003eERROR\u003c/level\u003e\n                            \u003cbubble\u003etrue\u003c/bubble\u003e\n                            \u003cappname\u003e***your app name here***\u003c/appname\u003e\n                        \u003c/params\u003e\n                    \u003c/NewRelicHandler\u003e\n                \u003c/handlers\u003e\n            \u003c/magemonolog\u003e\n        \u003c/default\u003e\n    \u003c/config\u003e\n\nIt is assumed you know Monolog's Handlers to understand the meaning of `params`\nnode.\n\nMultiple Log Handlers can be activated at the same time with different log\nfilter level; this way, for example, it is possible to log any message into a\nfile and only serious errors via e-mail.\n\nYou can also use Monolog's Formatters like shown below:\n\n    \u003cconfig\u003e\n        \u003cdefault\u003e\n            \u003cmagemonolog\u003e\n                \u003chandlers\u003e\n                    \u003cStreamHandler\u003e\n                        \u003cactive\u003e1\u003c/active\u003e\n                        \u003cparams\u003e\n                            \u003cstream\u003emagemonolog.log\u003c/stream\u003e\n                            \u003clevel\u003eDEBUG\u003c/level\u003e\n                            \u003cbubble\u003etrue\u003c/bubble\u003e\n                            \u003cfilePermission\u003enull\u003c/filePermission\u003e\n                            \u003cuseLocking\u003efalse\u003c/useLocking\u003e\n                        \u003c/params\u003e\n                        \u003cformatter\u003e\n                            \u003cclass\u003eLogstashFormatter\u003c/class\u003e\n                            \u003cargs\u003e\n                                \u003capplication_name\u003e\u003c![CDATA[MyAppName]]\u003e\u003c/application_name\u003e\n                                \u003csystem_name\u003e\u003c![CDATA[]]\u003e\u003c/system_name\u003e\n                                \u003cextra_prefix\u003e\u003c![CDATA[]]\u003e\u003c/extra_prefix\u003e\n                                \u003ccontext_prefix\u003e\u003c![CDATA[]]\u003e\u003c/context_prefix\u003e\n                                \u003cversion\u003e\u003c![CDATA[]]\u003e\u003c/version\u003e\n                            \u003c/args\u003e\n                        \u003c/formatter\u003e\n                    \u003c/StreamHandler\u003e\n                \u003c/handlers\u003e\n            \u003c/magemonolog\u003e\n        \u003c/default\u003e\n    \u003c/config\u003e\n\nThe `\u003cargs\u003e` tag should contain proper Formatter's contructor arguments. Arguments' tag name is not important, values\nare passed to Formatter's constructor in the exact order the constructor requires them. You should consult Formatter's\nconstructor signature to know which are its arguments, their meaning and their order.\n\nClosing words\n-------------\nAny feedback is appreciated.\n\nThis extension is published under the [Open Software License (OSL 3.0)](http://opensource.org/licenses/OSL-3.0).\n\nAny contribution or feedback is extremely appreciated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleron75%2Fmagemonolog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleron75%2Fmagemonolog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleron75%2Fmagemonolog/lists"}