├── .gitignore ├── src ├── lib │ ├── sentry │ │ ├── .gitattributes │ │ ├── lib │ │ │ └── Raven │ │ │ │ ├── Exception.php │ │ │ │ ├── SanitizeDataProcessor.php │ │ │ │ ├── Context.php │ │ │ │ ├── Util.php │ │ │ │ ├── Processor │ │ │ │ ├── RemoveHttpBodyProcessor.php │ │ │ │ ├── RemoveCookiesProcessor.php │ │ │ │ ├── SanitizeStacktraceProcessor.php │ │ │ │ └── SanitizeHttpHeadersProcessor.php │ │ │ │ ├── Processor.php │ │ │ │ ├── Autoloader.php │ │ │ │ ├── TransactionStack.php │ │ │ │ ├── Breadcrumbs │ │ │ │ └── ErrorHandler.php │ │ │ │ ├── ReprSerializer.php │ │ │ │ └── Breadcrumbs.php │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── AUTHORS │ │ ├── .php_cs │ │ ├── Makefile │ │ ├── .scrutinizer.yml │ │ ├── phpunit.xml │ │ ├── LICENSE │ │ ├── composer.json │ │ ├── .travis.yml │ │ └── bin │ │ │ └── sentry │ ├── Graylog2-gelf-php │ │ ├── README │ │ ├── index.php │ │ └── LICENSE │ ├── Airbrake │ │ ├── Exception.php │ │ ├── Resque │ │ │ └── NotifyJob.php │ │ ├── Version.php │ │ └── Connection.php │ ├── rsyslog │ │ ├── syslogseverity.php │ │ └── syslogfacility.php │ └── XMPPHP │ │ └── Exception.php ├── app │ ├── locale │ │ └── en_US │ │ │ └── template │ │ │ └── email │ │ │ └── firegento_logger │ │ │ └── notification.html │ ├── design │ │ ├── adminhtml │ │ │ └── default │ │ │ │ └── default │ │ │ │ └── template │ │ │ │ └── firegento_logger │ │ │ │ ├── detail.view.phtml │ │ │ │ ├── raven.phtml │ │ │ │ └── test.view.phtml │ │ └── frontend │ │ │ └── base │ │ │ └── default │ │ │ ├── template │ │ │ └── firegento_logger │ │ │ │ ├── js.phtml │ │ │ │ └── raven.phtml │ │ │ └── layout │ │ │ └── firegento_logger.xml │ ├── code │ │ └── community │ │ │ └── FireGento │ │ │ └── Logger │ │ │ ├── sql │ │ │ └── logger_setup │ │ │ │ ├── mysql4-upgrade-1.4.1-1.4.2.php │ │ │ │ └── mysql4-install-0.0.1.php │ │ │ ├── data │ │ │ └── logger_setup │ │ │ │ ├── data-install-1.3.0.php │ │ │ │ ├── data-upgrade-1.4.0-1.4.1.php │ │ │ │ └── data-upgrade-1.3.0-1.4.0.php │ │ │ ├── Model │ │ │ ├── Db │ │ │ │ └── Entry.php │ │ │ ├── Resource │ │ │ │ └── Db │ │ │ │ │ ├── Entry │ │ │ │ │ └── Collection.php │ │ │ │ │ └── Entry.php │ │ │ ├── System │ │ │ │ └── Config │ │ │ │ │ └── Source │ │ │ │ │ ├── Prioritydefault.php │ │ │ │ │ ├── Protocol.php │ │ │ │ │ ├── Curlmethods.php │ │ │ │ │ ├── Targets.php │ │ │ │ │ ├── Priorities.php │ │ │ │ │ └── SyslogFacilities.php │ │ │ ├── Stream.php │ │ │ ├── Loggly │ │ │ │ └── LogglySyslogMessage.php │ │ │ ├── Syslog.php │ │ │ ├── Abstract.php │ │ │ ├── JsonStream.php │ │ │ └── Chromelogger.php │ │ │ ├── Block │ │ │ └── Adminhtml │ │ │ │ ├── Logger │ │ │ │ └── View.php │ │ │ │ ├── Logger.php │ │ │ │ ├── Test.php │ │ │ │ ├── LiveView.php │ │ │ │ └── System │ │ │ │ └── Config │ │ │ │ ├── Renderer │ │ │ │ └── Select.php │ │ │ │ └── EmailNotificationRule.php │ │ │ ├── Formatter │ │ │ └── Simple.php │ │ │ └── controllers │ │ │ └── ErrorController.php │ └── etc │ │ └── modules │ │ └── FireGento_Logger.xml └── skin │ └── adminhtml │ └── default │ └── default │ └── firegento_logger.css ├── phpdox.xml.dist ├── composer.json ├── docs └── api │ ├── html │ ├── traits.xhtml │ ├── interfaces.xhtml │ ├── namespaces.xhtml │ ├── index.xhtml │ ├── classes │ │ ├── XMPPHP_BOSH │ │ │ ├── __process.xhtml │ │ │ ├── loadSession.xhtml │ │ │ ├── saveSession.xhtml │ │ │ └── __parseBuffer.xhtml │ │ ├── Roster │ │ │ └── getRoster.xhtml │ │ ├── XMPPHP_XMLStream │ │ │ ├── time.xhtml │ │ │ ├── read.xhtml │ │ │ ├── readyToProcess.xhtml │ │ │ ├── reset.xhtml │ │ │ ├── disconnect.xhtml │ │ │ ├── doReconnect.xhtml │ │ │ ├── setupParser.xhtml │ │ │ └── __destruct.xhtml │ │ ├── ChromePhp │ │ │ ├── group.xhtml │ │ │ ├── table.xhtml │ │ │ ├── groupEnd.xhtml │ │ │ ├── __construct.xhtml │ │ │ └── groupCollapsed.xhtml │ │ ├── XMPPHP_XMPP │ │ │ └── getRoster.xhtml │ │ ├── FireGento_Logger_Shell │ │ │ ├── run.xhtml │ │ │ ├── runClean.xhtml │ │ │ ├── runRotate.xhtml │ │ │ └── runTestMessage.xhtml │ │ └── Exception │ │ │ ├── __clone.xhtml │ │ │ ├── getCode.xhtml │ │ │ ├── getTrace.xhtml │ │ │ ├── getMessage.xhtml │ │ │ └── getFile.xhtml │ └── source │ │ ├── app │ │ └── index.xhtml │ │ └── shell │ │ └── index.xhtml │ └── xml │ └── classes │ ├── FireGento_Logger_Model_Db_Entry.xml │ ├── FireGento_Logger_Model_System_Config_Source_SyslogFacilities.xml │ ├── FireGento_Logger_Block_Adminhtml_Logger.xml │ ├── FireGento_Logger_Model_Syslog.xml │ ├── FireGento_Logger_Block_Adminhtml_LiveView.xml │ ├── FireGento_Logger_Model_Resource_Db_Entry_Collection.xml │ ├── FireGento_Logger_Model_System_Config_Source_Priorities.xml │ ├── FireGento_Logger_Block_Adminhtml_Logger_View.xml │ ├── FireGento_Logger_Model_System_Config_Source_Targets.xml │ ├── FireGento_Logger_Block_Adminhtml_Test.xml │ ├── FireGento_Logger_Model_System_Config_Source_Protocol.xml │ ├── FireGento_Logger_Block_Adminhtml_System_Config_EmailNotificationRule.xml │ ├── FireGento_Logger_Block_Adminhtml_System_Config_Renderer_Select.xml │ ├── FireGento_Logger_Formatter_Simple.xml │ ├── SyslogSeverity.xml │ ├── FireGento_Logger_Model_Resource_Db_Entry.xml │ ├── FireGento_Logger_Block_Adminhtml_System_Config_Targetmap.xml │ ├── FireGento_Logger_Model_System_Config_Source_Prioritydefault.xml │ ├── FireGento_Logger_Model_Chromelogger.xml │ ├── FireGento_Logger_Shell.xml │ └── SyslogFacility.xml └── modman /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /src/lib/sentry/.gitattributes: -------------------------------------------------------------------------------- 1 | /examples export-ignore 2 | /docs export-ignore 3 | /test export-ignore 4 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Exception.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Exception: {{var loggerentry_url}} -------------------------------------------------------------------------------- /src/lib/Graylog2-gelf-php/README: -------------------------------------------------------------------------------- 1 | PHP classes to send GELF (Graylog extended log format) messages 2 | 3 | See http://www.graylog2.org/about/gelf for more information. 4 | -------------------------------------------------------------------------------- /src/lib/sentry/AUTHORS: -------------------------------------------------------------------------------- 1 | The Sentry PHP SDK was originally written by Michael van Tellingen 2 | and is maintained by the Sentry Team. 3 | 4 | http://github.com/getsentry/sentry-php/contributors 5 | -------------------------------------------------------------------------------- /src/lib/sentry/.php_cs: -------------------------------------------------------------------------------- 1 | in(__DIR__) 5 | ; 6 | 7 | return Symfony\CS\Config\Config::create() 8 | ->setUsingCache(true) 9 | ->setUsingLinter(true) 10 | ->level(Symfony\CS\FixerInterface::PSR2_LEVEL) 11 | ->finder($finder) 12 | ; 13 | -------------------------------------------------------------------------------- /src/lib/Airbrake/Exception.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright (c) 2011-2013 Drew Butler 10 | * @license http://www.opensource.org/licenses/mit-license.php 11 | */ 12 | class Exception extends \Exception 13 | { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /phpdox.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/lib/Airbrake/Resque/NotifyJob.php: -------------------------------------------------------------------------------- 1 | args['notice']); 13 | $configuration = unserialize($this->args['configuration']); 14 | 15 | $connection = new Connection($configuration); 16 | echo $connection->send($notice); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "firegento/logger", 3 | "license": ["GPL-3.0"], 4 | "type": "magento-module", 5 | "description": "FireGento Logger is an advanced alternative to log messages and errors to multiple targets.", 6 | "homepage": "https://github.com/firegento/firegento-logger", 7 | "suggest": { 8 | "magento-hackathon/magento-composer-installer": "Allows to manage this package as a dependency" 9 | }, 10 | "require": { 11 | "paragonie/random_compat": "^9.99" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/lib/sentry/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test 2 | 3 | develop: update-submodules 4 | composer install --dev 5 | make setup-git 6 | 7 | update-submodules: 8 | git submodule init 9 | git submodule update 10 | 11 | cs: 12 | vendor/bin/php-cs-fixer fix --config-file=.php_cs --verbose --diff 13 | 14 | cs-dry-run: 15 | vendor/bin/php-cs-fixer fix --config-file=.php_cs --verbose --diff --dry-run 16 | 17 | test: cs-dry-run 18 | vendor/bin/phpunit 19 | 20 | setup-git: 21 | git config branch.autosetuprebase always 22 | -------------------------------------------------------------------------------- /src/lib/Airbrake/Version.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright (c) 2011-2013 Drew Butler 10 | * @license http://www.opensource.org/licenses/mit-license.php 11 | */ 12 | class Version 13 | { 14 | const NAME = 'nodrew-php-airbrake'; 15 | const NUMBER = '1.0'; 16 | const APP_URL = 'https://github.com/nodrew/php-airbrake'; 17 | const API = '2.0'; 18 | } 19 | -------------------------------------------------------------------------------- /src/lib/Graylog2-gelf-php/index.php: -------------------------------------------------------------------------------- 1 | setShortMessage('something is broken.'); 8 | $message->setFullMessage("lol full message!"); 9 | $message->setHost('somehost'); 10 | $message->setLevel(2); 11 | $message->setFile('/var/www/example.php'); 12 | $message->setLine(1337); 13 | $message->setAdditional("something", "foo"); 14 | $message->setAdditional("something_else", "bar"); 15 | 16 | $publisher = new GELFMessagePublisher('172.16.22.30'); 17 | $publisher->publish($message); -------------------------------------------------------------------------------- /src/lib/sentry/.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | tools: 2 | php_sim: false 3 | php_pdepend: true 4 | php_analyzer: true 5 | php_code_coverage: true 6 | external_code_coverage: 7 | timeout: 2400 # There can be another pull request in progress 8 | runs: 7 # PHP 5.3 + PHP 5.4 + PHP 5.5 + PHP 5.6 + PHP 7.0 + PHP 7.1 + PHP 7.2 9 | 10 | build: 11 | environment: 12 | php: 13 | version: 5.6.0 14 | redis: false 15 | postgresql: false 16 | mongodb: false 17 | 18 | filter: 19 | excluded_paths: [vendor/*, test/*, bin/*, docs/*, examples/*] 20 | -------------------------------------------------------------------------------- /src/app/design/adminhtml/default/default/template/firegento_logger/detail.view.phtml: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 |

__('Logger Entry: #' . $this->getLoggerEntry()->getId()); ?>

9 |
10 | 11 |
12 |
getLoggerEntry()->getMessage();?>
13 |
14 | 15 | 18 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/SanitizeDataProcessor.php: -------------------------------------------------------------------------------- 1 | 2 | window.onerror = function (message, url, lineNumber) { 3 | var xhttp = new XMLHttpRequest(); 4 | 5 | // build parameters 6 | var params = 'message=' + encodeURIComponent(message); 7 | params += '&url=' + encodeURIComponent(document.location); 8 | 9 | xhttp.open("POST", 'getUrl('logger/error/send'); ?>', true); 10 | xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 11 | xhttp.send(params); 12 | 13 | // continue with default error handler 14 | return false; 15 | }; 16 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Context.php: -------------------------------------------------------------------------------- 1 | clear(); 25 | } 26 | 27 | /** 28 | * Clean up existing context. 29 | */ 30 | public function clear() 31 | { 32 | $this->tags = array(); 33 | $this->extra = array(); 34 | $this->user = null; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/sql/logger_setup/mysql4-upgrade-1.4.1-1.4.2.php: -------------------------------------------------------------------------------- 1 | run("ALTER TABLE {$this->getTable('advanced_logger')} ENGINE = InnoDb;"); 19 | -------------------------------------------------------------------------------- /src/lib/sentry/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | ./test/Raven/ 16 | ./test/Raven/phpt/ 17 | 18 | 19 | 20 | 21 | 22 | ./lib/Raven/ 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/app/design/adminhtml/default/default/template/firegento_logger/raven.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | -------------------------------------------------------------------------------- /src/app/design/frontend/base/default/template/firegento_logger/raven.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Util.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | final class Raven_Processor_RemoveHttpBodyProcessor extends Raven_Processor 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | public function process(&$data) 25 | { 26 | if (isset($data['request'], $data['request']['method']) && in_array(strtoupper($data['request']['method']), array('POST', 'PUT', 'PATCH', 'DELETE'))) { 27 | $data['request']['data'] = self::STRING_MASK; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/lib/rsyslog/syslogseverity.php: -------------------------------------------------------------------------------- 1 | 7 | @copyright Copyright (c) 2013 Diego Zanella (http://dev.pathtoenlightenment.net) 8 | @license http://dev.pathtoenlightenment.net/noncommercial-licence/ Noncommercial Licence 9 | */ 10 | 11 | /** 12 | * Holds the possible values for Syslog Severity 13 | */ 14 | final class SyslogSeverity { 15 | const EMERGENCY = 0; 16 | const ALERT = 1; 17 | const CRITICAL = 2; 18 | const ERROR = 3; 19 | const WARNING = 4; 20 | const NOTICE = 5; 21 | const INFO = 6; 22 | const DEBUG = 7; 23 | 24 | /** 25 | * Checks if a value is a valid Syslog Severity. 26 | * 27 | * @param Severity The value to validate. 28 | * @return True if the value is a valid Severity, False otherwise. 29 | */ 30 | public static function IsValidSeverity($Severity) { 31 | return isset($Severity) && 32 | $Severity >= self::EMERGENCY && 33 | $Severity <= self::DEBUG; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /docs/api/html/traits.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | phpDox - Overview 5 | 6 | 7 | 8 | 9 | 28 |
29 |

Traits

30 |
31 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /docs/api/html/interfaces.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | phpDox - Overview 5 | 6 | 7 | 8 | 9 | 28 |
29 |

Interfaces

30 |
31 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Processor/RemoveCookiesProcessor.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | final class Raven_Processor_RemoveCookiesProcessor extends Raven_Processor 19 | { 20 | /** 21 | * {@inheritdoc} 22 | */ 23 | public function process(&$data) 24 | { 25 | if (isset($data['request'])) { 26 | if (isset($data['request']['cookies'])) { 27 | $data['request']['cookies'] = self::STRING_MASK; 28 | } 29 | 30 | if (isset($data['request']['headers']) && isset($data['request']['headers']['Cookie'])) { 31 | $data['request']['headers']['Cookie'] = self::STRING_MASK; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Processor.php: -------------------------------------------------------------------------------- 1 | client = $client; 28 | } 29 | 30 | /** 31 | * Override the default processor options 32 | * 33 | * @param array $options Associative array of processor options 34 | */ 35 | public function setProcessorOptions(array $options) 36 | { 37 | } 38 | 39 | /** 40 | * Process and sanitize data, modifying the existing value if necessary. 41 | * 42 | * @param array $data Array of log data 43 | */ 44 | abstract public function process(&$data); 45 | } 46 | -------------------------------------------------------------------------------- /src/lib/Graylog2-gelf-php/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2012 Lennart Koopmann 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Autoloader.php: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | true 25 | community 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Processor/SanitizeStacktraceProcessor.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | class Raven_Processor_SanitizeStacktraceProcessor extends Raven_Processor 19 | { 20 | /** 21 | * {@inheritdoc} 22 | */ 23 | public function process(&$data) 24 | { 25 | if (!isset($data['exception'], $data['exception']['values'])) { 26 | return; 27 | } 28 | 29 | foreach ($data['exception']['values'] as &$exception) { 30 | if (!isset($exception['stacktrace'])) { 31 | continue; 32 | } 33 | 34 | foreach ($exception['stacktrace']['frames'] as &$frame) { 35 | unset($frame['pre_context'], $frame['context_line'], $frame['post_context']); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/app/design/frontend/base/default/layout/firegento_logger.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/skin/adminhtml/default/default/firegento_logger.css: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of a FireGento e.V. module. 3 | * 4 | * This FireGento e.V. module is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License version 3 as 6 | * published by the Free Software Foundation. 7 | * 8 | * This script is distributed in the hope that it will be useful, but WITHOUT 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 11 | * 12 | * @category FireGento 13 | * @package FireGento_Logger 14 | * @author FireGento Team 15 | * @copyright 2013 FireGento Team (http://www.firegento.com) 16 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 17 | */ 18 | 19 | .logger-controls{margin-bottom:6px} 20 | #log_output{width:100%;height:500px;overflow:auto;margin:0;padding:3px;background:#000;color:#2EC029;font:400 11px Lucida Console,Courier New,serif} 21 | 22 | .adminhtml-logger-view .exception { 23 | margin-bottom: 20px; 24 | } 25 | 26 | .adminhtml-logger-view .exception pre { 27 | word-wrap: break-word; 28 | } 29 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/data/logger_setup/data-install-1.3.0.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Upgrade script to update advanced formater log format. 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | 29 | /* @var $installer Mage_Core_Model_Resource_Setup */ 30 | $installer = $this; 31 | 32 | //just a dummy 33 | -------------------------------------------------------------------------------- /src/app/design/adminhtml/default/default/template/firegento_logger/test.view.phtml: -------------------------------------------------------------------------------- 1 | 16 | * @copyright 2013 FireGento Team (http://www.firegento.com) 17 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 18 | */ 19 | ?> 20 | 25 | generateLogMessage(); ?>
26 | generateLogMessage(); ?>
27 | generateLogMessage(); ?>
28 | generateLogMessage(); ?>
29 | generateLogMessage(); ?>
30 | generateLogMessage(); ?>
-------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/TransactionStack.php: -------------------------------------------------------------------------------- 1 | stack = array(); 16 | } 17 | 18 | public function clear() 19 | { 20 | $this->stack = array(); 21 | } 22 | 23 | public function peek() 24 | { 25 | $len = count($this->stack); 26 | if ($len === 0) { 27 | return null; 28 | } 29 | return $this->stack[$len - 1]; 30 | } 31 | 32 | public function push($context) 33 | { 34 | $this->stack[] = $context; 35 | } 36 | 37 | /** @noinspection PhpInconsistentReturnPointsInspection 38 | * @param string|null $context 39 | * @return mixed 40 | */ 41 | public function pop($context = null) 42 | { 43 | if (!$context) { 44 | return array_pop($this->stack); 45 | } 46 | while (!empty($this->stack)) { 47 | if (array_pop($this->stack) === $context) { 48 | return $context; 49 | } 50 | } 51 | // @codeCoverageIgnoreStart 52 | } 53 | // @codeCoverageIgnoreEnd 54 | } 55 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_Db_Entry.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_System_Config_Source_SyslogFacilities.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Block_Adminhtml_Logger.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/Db/Entry.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Db Entry Model 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | * 28 | * @method getMessage() 29 | * @method getSeverity() 30 | */ 31 | class FireGento_Logger_Model_Db_Entry extends Mage_Core_Model_Abstract 32 | { 33 | /** 34 | * Init the resource model 35 | */ 36 | protected function _construct() 37 | { 38 | $this->_init('firegento_logger/db_entry'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Breadcrumbs/ErrorHandler.php: -------------------------------------------------------------------------------- 1 | ravenClient = $ravenClient; 18 | } 19 | 20 | public function handleError($code, $message, $file = '', $line = 0, $context = array()) 21 | { 22 | $this->ravenClient->breadcrumbs->record(array( 23 | 'category' => 'error_reporting', 24 | 'message' => $message, 25 | 'level' => $this->ravenClient->translateSeverity($code), 26 | 'data' => array( 27 | 'code' => $code, 28 | 'line' => $line, 29 | 'file' => $file, 30 | ), 31 | )); 32 | 33 | if ($this->existingHandler !== null) { 34 | return call_user_func($this->existingHandler, $code, $message, $file, $line, $context); 35 | } else { 36 | return false; 37 | } 38 | } 39 | 40 | public function install() 41 | { 42 | $this->existingHandler = set_error_handler(array($this, 'handleError'), E_ALL); 43 | return $this; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_Syslog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/data/logger_setup/data-upgrade-1.4.0-1.4.1.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Upgrade script to update the db logger table 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | 29 | /* @var $installer Mage_Core_Model_Resource_Setup */ 30 | $installer = $this; 31 | $installer->startSetup(); 32 | 33 | $installer->getConnection()->addColumn( 34 | $installer->getTable('firegento_logger/db_entry'), 35 | 'advanced_info', 36 | 'text' 37 | ); 38 | 39 | $installer->endSetup(); -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/ReprSerializer.php: -------------------------------------------------------------------------------- 1 | serializeString($value); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/Resource/Db/Entry/Collection.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Db Entry Resource Collection Model 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Model_Resource_Db_Entry_Collection 29 | extends Mage_Core_Model_Resource_Db_Collection_Abstract 30 | { 31 | /** 32 | * Init the model and resource model 33 | */ 34 | public function _construct() 35 | { 36 | $this->_init('firegento_logger/db_entry'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Block/Adminhtml/Logger/View.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Log/Report Viewer for the backend 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Block_Adminhtml_Logger_View extends Mage_Core_Block_Template 29 | { 30 | /** 31 | * Get the logger entry 32 | * 33 | * @return FireGento_Logger_Model_Db_Entry the entry 34 | */ 35 | public function getLoggerEntry() 36 | { 37 | return Mage::registry('current_loggerentry'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Block_Adminhtml_LiveView.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_Resource_Db_Entry_Collection.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Formatter/Simple.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Simple Formatted Logger 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Formatter_Simple extends Zend_Log_Formatter_Simple 29 | { 30 | /** 31 | * Formats data into a single line to be written by the writer. 32 | * 33 | * @param FireGento_Logger_Model_Event $event Event Data 34 | * @return string formatted line to write to the log 35 | */ 36 | public function format($event) 37 | { 38 | return parent::format($event->getEventDataArraySimple()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/lib/sentry/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Sentry Team and individual contributors. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | 8 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | 10 | 3. Neither the name of the Raven, Sentry, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/controllers/ErrorController.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Log JS errors to the backend 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_ErrorController extends Mage_Core_Controller_Front_Action 29 | { 30 | /** 31 | * send a js error to the backend 32 | */ 33 | public function sendAction() 34 | { 35 | $request = $this->getRequest(); 36 | $errorMessage = 'MESSAGE|' . $request->getParam('message') . "\n"; 37 | $errorMessage .= 'URL|' . $request->getParam('url'); 38 | Mage::log($errorMessage, Zend_Log::ERR); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_System_Config_Source_Priorities.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Block_Adminhtml_Logger_View.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Block/Adminhtml/Logger.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Logger Grid Container 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Block_Adminhtml_Logger 29 | extends Mage_Adminhtml_Block_Widget_Grid_Container 30 | { 31 | /** 32 | * Class constructor 33 | */ 34 | public function __construct() 35 | { 36 | parent::__construct(); 37 | $this->_controller = 'adminhtml_logger'; 38 | $this->_blockGroup = 'firegento_logger'; 39 | $this->_headerText = Mage::helper('firegento_logger')->__('Database entries'); 40 | $this->removeButton('add'); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/lib/XMPPHP/Exception.php: -------------------------------------------------------------------------------- 1 | 24 | * @author Stephan Wentz 25 | * @author Michael Garvin 26 | * @copyright 2008 Nathanael C. Fritz 27 | */ 28 | 29 | /** 30 | * XMPPHP Exception 31 | * 32 | * @category xmpphp 33 | * @package XMPPHP 34 | * @author Nathanael C. Fritz 35 | * @author Stephan Wentz 36 | * @author Michael Garvin 37 | * @copyright 2008 Nathanael C. Fritz 38 | * @version $Id$ 39 | */ 40 | class XMPPHP_Exception extends Exception { 41 | } 42 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_System_Config_Source_Targets.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Block_Adminhtml_Test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_System_Config_Source_Protocol.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /modman: -------------------------------------------------------------------------------- 1 | src/app/code/community/FireGento/Logger/ app/code/community/FireGento/Logger/ 2 | src/app/etc/modules/FireGento_Logger.xml app/etc/modules/FireGento_Logger.xml 3 | src/app/design/adminhtml/default/default/layout/firegento_logger.xml app/design/adminhtml/default/default/layout/firegento_logger.xml 4 | src/app/design/adminhtml/default/default/template/firegento_logger/ app/design/adminhtml/default/default/template/firegento_logger/ 5 | src/app/design/frontend/base/default/layout/firegento_logger.xml app/design/frontend/base/default/layout/firegento_logger.xml 6 | src/app/design/frontend/base/default/template/firegento_logger/ app/design/frontend/base/default/template/firegento_logger/ 7 | src/lib/Airbrake/ lib/Airbrake/ 8 | src/lib/XMPPHP/ lib/XMPPHP/ 9 | src/lib/Graylog2-gelf-php/ lib/Graylog2-gelf-php/ 10 | src/lib/rsyslog/ lib/rsyslog 11 | src/lib/chromelogger/ lib/chromelogger 12 | src/lib/sentry/ lib/sentry 13 | src/shell/logger.php shell/logger.php 14 | src/skin/adminhtml/default/default/firegento_logger.css skin/adminhtml/default/default/firegento_logger.css 15 | src/app/locale/en_US/template/email/firegento_logger app/locale/en_US/template/email/firegento_logger 16 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Block/Adminhtml/Test.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Block for live viewing the log files in the backend 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Block_Adminhtml_Test extends Mage_Adminhtml_Block_Template 29 | { 30 | /** 31 | * This method will generate a log message. 32 | * 33 | * @param int $level a level to generate 34 | * 35 | * @return string 36 | */ 37 | public function generateLogMessage($level = Zend_Log::INFO) 38 | { 39 | $message = sprintf("This is an log event with level %s", $level); 40 | Mage::log($message, $level); 41 | echo $message; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Block_Adminhtml_System_Config_EmailNotificationRule.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/lib/rsyslog/syslogfacility.php: -------------------------------------------------------------------------------- 1 | 7 | @copyright Copyright (c) 2013 Diego Zanella (http://dev.pathtoenlightenment.net) 8 | @license http://dev.pathtoenlightenment.net/noncommercial-licence/ Noncommercial Licence 9 | */ 10 | 11 | /** 12 | * Holds the possible values for Syslog Facility 13 | */ 14 | final class SyslogFacility { 15 | const KERNEL = 0; 16 | const USER = 1; 17 | const MAIL = 2; 18 | const SYSDAEMON = 3; 19 | const SECURITY1 = 4; // Different Operating Systems pass different values for Security, hence the duplicate 20 | const SYSLOG = 5; 21 | const LINEPRINTER = 6; 22 | const NETWORK = 7; 23 | const UUCP = 8; 24 | const CLOCK = 9; 25 | const SECURITY2 = 10; // Different Operating Systems pass different values for Security, hence the duplicate 26 | const FTPDAEMON = 11; 27 | const NTP = 12; 28 | const LOGAUDIT = 13; 29 | const LOGALERT = 14; 30 | const CLOCKDAEMON = 15; 31 | const LOCAL0 = 16; 32 | const LOCAL1 = 17; 33 | const LOCAL2 = 18; 34 | const LOCAL3 = 19; 35 | const LOCAL4 = 20; 36 | const LOCAL5 = 21; 37 | const LOCAL6 = 22; 38 | const LOCAL7 = 23; 39 | 40 | /** 41 | * Checks if a value is a valid Syslog Facility. 42 | * 43 | * @param Facility The value to validate. 44 | * @return True if the value is a valid Facility, False otherwise. 45 | */ 46 | public static function IsValidFacility($Facility) { 47 | return isset($Facility) && 48 | $Facility >= self::KERNEL && 49 | $Facility <= self::LOCAL7; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/data/logger_setup/data-upgrade-1.3.0-1.4.0.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Upgrade script to update advanced formater log format. 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | 29 | /* @var $installer Mage_Core_Model_Resource_Setup */ 30 | $installer = $this; 31 | $installer->startSetup(); 32 | 33 | $advancedFormatPath = "logger/general/format"; 34 | $advancedFormat = "%timestamp% %priorityName% (%storeCode%): %requestMethod% %requestUri% 35 | REQUEST: %requestData% 36 | TIME: %timeElapsed%s 37 | ADDRESS: %remoteAddress% 38 | USER AGENT: %httpUserAgent% 39 | FILE: %file%:%line% 40 | %message%"; 41 | 42 | $installer->setConfigData($advancedFormatPath, $advancedFormat); 43 | 44 | $installer->endSetup(); 45 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/sql/logger_setup/mysql4-install-0.0.1.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Setup script 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | 29 | /* @var $installer Mage_Core_Model_Resource_Setup */ 30 | $installer = $this; 31 | $installer->startSetup(); 32 | 33 | $installer->run(" 34 | DROP TABLE if exists {$this->getTable('advanced_logger')}; 35 | CREATE TABLE {$this->getTable('advanced_logger')} ( 36 | `entity_id` int(10) unsigned NOT NULL auto_increment, 37 | `message` text, 38 | `severity` int(2), 39 | `timestamp` timestamp default CURRENT_TIMESTAMP, 40 | PRIMARY KEY (`entity_id`) 41 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 42 | "); 43 | 44 | $installer->endSetup(); 45 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/System/Config/Source/Prioritydefault.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Log priorities 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Model_System_Config_Source_Prioritydefault 29 | extends FireGento_Logger_Model_System_Config_Source_Priorities 30 | { 31 | /** 32 | * Retrieve all priorities with a default value 33 | * 34 | * @return array Priorities 35 | */ 36 | public function toOptionArray() 37 | { 38 | $options = parent::toOptionArray(); 39 | $helper = Mage::helper('firegento_logger'); 40 | array_unshift($options, array('label' => $helper->__('Default'), 'value' => 'default')); 41 | 42 | return $options; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Block_Adminhtml_System_Config_Renderer_Select.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Formatter_Simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/System/Config/Source/Protocol.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Different protocol version 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Model_System_Config_Source_Protocol 29 | { 30 | /** 31 | * @var array Options 32 | */ 33 | protected $_options = array(); 34 | 35 | /** 36 | * Retrieve all targets as option arry 37 | * 38 | * @return array Targets 39 | */ 40 | public function toOptionArray() 41 | { 42 | if (!$this->_options) { 43 | $this->_options[] = array('label' => 'UDP', 'value' => 'udp'); 44 | $this->_options[] = array('label' => 'TCP', 'value' => 'tcp'); 45 | } 46 | 47 | return $this->_options; 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /docs/api/xml/classes/SyslogSeverity.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/System/Config/Source/Curlmethods.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * cURL methods 23 | * 24 | * @see https://docs.sentry.io/clients/php/config/ "curl_method" section 25 | * 26 | * @category FireGento 27 | * @package FireGento_Logger 28 | * @author FireGento Team 29 | */ 30 | class FireGento_Logger_Model_System_Config_Source_Curlmethods 31 | { 32 | /** 33 | * Retrieve all cURL methods 34 | * 35 | * @return array 36 | */ 37 | public function toOptionArray() 38 | { 39 | $helper = Mage::helper('firegento_logger'); 40 | 41 | return array( 42 | array('label' => $helper->__('sync'), 'value' => 'sync'), 43 | array('label' => $helper->__('async (default)'), 'value' => 'async'), 44 | array('label' => $helper->__('exec'), 'value' => 'exec'), 45 | ); 46 | } 47 | } -------------------------------------------------------------------------------- /docs/api/html/namespaces.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Overview 6 | 7 | 8 | 9 | 10 | 29 |
30 |

Namespaces

31 |
32 |

Namespaces

33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 48 | 49 | 50 |
NameInterfacesClassesTraits
\0 46 | 52 47 | 0
51 |
52 |
53 |
54 | 55 |
56 | 57 | 58 | -------------------------------------------------------------------------------- /src/lib/sentry/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sentry/sentry", 3 | "type": "library", 4 | "description": "A PHP client for Sentry (http://getsentry.com)", 5 | "keywords": ["log", "logging"], 6 | "homepage": "http://getsentry.com", 7 | "license": "BSD-3-Clause", 8 | "authors": [ 9 | { 10 | "name": "David Cramer", 11 | "email": "dcramer@gmail.com" 12 | } 13 | ], 14 | "require-dev": { 15 | "friendsofphp/php-cs-fixer": "^1.8.0", 16 | "phpunit/phpunit": "^4.8.35 || ^5.7", 17 | "monolog/monolog": "*" 18 | }, 19 | "require": { 20 | "php": "^5.3|^7.0", 21 | "ext-curl": "*" 22 | }, 23 | "suggest": { 24 | "ext-hash": "*", 25 | "ext-json": "*", 26 | "ext-mbstring": "*", 27 | "monolog/monolog": "Automatically capture Monolog events as breadcrumbs" 28 | }, 29 | "conflict": { 30 | "raven/raven": "*" 31 | }, 32 | "bin": [ 33 | "bin/sentry" 34 | ], 35 | "autoload": { 36 | "psr-0" : { 37 | "Raven_" : "lib/" 38 | } 39 | }, 40 | "scripts": { 41 | "tests": [ 42 | "vendor/bin/phpunit --verbose" 43 | ], 44 | "tests-travis": [ 45 | "vendor/bin/phpunit --verbose --configuration phpunit.xml --coverage-clover test/clover.xml" 46 | ], 47 | "tests-report": [ 48 | "vendor/bin/phpunit --verbose --configuration phpunit.xml --coverage-html test/html-report" 49 | ], 50 | "phpcs": [ 51 | "vendor/bin/php-cs-fixer fix --config-file=.php_cs --verbose --diff --dry-run" 52 | ] 53 | }, 54 | "extra": { 55 | "branch-alias": { 56 | "dev-master": "1.10.x-dev" 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Breadcrumbs.php: -------------------------------------------------------------------------------- 1 | size = $size; 30 | $this->reset(); 31 | } 32 | 33 | public function reset() 34 | { 35 | $this->count = 0; 36 | $this->pos = 0; 37 | $this->buffer = array(); 38 | } 39 | 40 | public function record($crumb) 41 | { 42 | if (empty($crumb['timestamp'])) { 43 | $crumb['timestamp'] = microtime(true); 44 | } 45 | $this->buffer[$this->pos] = $crumb; 46 | $this->pos = ($this->pos + 1) % $this->size; 47 | $this->count++; 48 | } 49 | 50 | /** 51 | * @return array[] 52 | */ 53 | public function fetch() 54 | { 55 | $results = array(); 56 | for ($i = 0; $i <= ($this->size - 1); $i++) { 57 | $idx = ($this->pos + $i) % $this->size; 58 | if (isset($this->buffer[$idx])) { 59 | $results[] = $this->buffer[$idx]; 60 | } 61 | } 62 | return $results; 63 | } 64 | 65 | public function is_empty() 66 | { 67 | return $this->count === 0; 68 | } 69 | 70 | public function to_json() 71 | { 72 | return array( 73 | 'values' => $this->fetch(), 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/Stream.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Like ZLWStream but overrides the formatter to use the advanced formatter 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Model_Stream extends Zend_Log_Writer_Stream 29 | { 30 | 31 | /** 32 | * Write a message to the log. 33 | * 34 | * @param array $event Event Data 35 | * @throws Zend_Log_Exception 36 | */ 37 | protected function _write($event) 38 | { 39 | $event = Mage::helper('firegento_logger')->getEventObjectFromArray($event); 40 | 41 | $line = $this->_formatter->format($event); 42 | 43 | if (false === @fwrite($this->_stream, $line)) { 44 | //require_once 'Zend/Log/Exception.php'; 45 | throw new Zend_Log_Exception("Unable to write to stream"); 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/Loggly/LogglySyslogMessage.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Implementation of Remote Syslog Message for Loggly. This class logs the 23 | * events using JSON, which allows providing more details than basic Syslog. 24 | * 25 | * @category FireGento 26 | * @package FireGento_Logger 27 | * @author FireGento Team 28 | */ 29 | class FireGento_Logger_Model_Loggly_LogglySyslogMessage extends SyslogMessage 30 | { 31 | /** 32 | * Puts all Log Message elements together to form a JSON String that will be 33 | * passed to the RSysLog Server. 34 | * 35 | * @return string The Message as a JSON object. 36 | */ 37 | protected function FormatMessage() 38 | { 39 | return $this->Message; 40 | } 41 | 42 | /** 43 | * @return array 44 | */ 45 | public function GetMessageChunks() 46 | { 47 | return array($this->FormatMessage()); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/Syslog.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright Lee Saferite 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Syslog Wrapper 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author Lee Saferite 27 | * @since 2014-07-01 28 | */ 29 | class FireGento_Logger_Model_Syslog extends Zend_Log_Writer_Syslog 30 | { 31 | /** 32 | * @param string $filename 33 | */ 34 | public function __construct($filename) 35 | { 36 | $logDir = Mage::getBaseDir('var') . DS . 'log' . DS; 37 | $filename = substr($filename, strlen($logDir)); 38 | 39 | /* @var $helper FireGento_Logger_Helper_Data */ 40 | $helper = Mage::helper('firegento_logger'); 41 | 42 | $options = array( 43 | 'application' => $helper->getLoggerConfig('syslog/application') . $filename, 44 | 'facility' => $helper->getLoggerConfig('syslog/facility'), 45 | ); 46 | 47 | parent::__construct($options); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_Resource_Db_Entry.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/Abstract.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | 22 | /** 23 | * Abstract model for all log writers 24 | * 25 | * @category FireGento 26 | * @package FireGento_Logger 27 | * @author FireGento Team 28 | */ 29 | abstract class FireGento_Logger_Model_Abstract extends Zend_Log_Writer_Abstract 30 | { 31 | /** 32 | * @var bool Indicates if backtrace should be added to the Log Message. 33 | */ 34 | protected $_enableBacktrace = false; 35 | 36 | /** 37 | * Setter for class variable _enableBacktrace 38 | * 39 | * @param bool $flag Flag for Backtrace 40 | */ 41 | public function setEnableBacktrace($flag) 42 | { 43 | $this->_enableBacktrace = $flag; 44 | } 45 | 46 | /** 47 | * Satisfy newer Zend Framework 48 | * 49 | * @param array|Zend_Config $config Configuration 50 | * @return void|Zend_Log_FactoryInterface 51 | */ 52 | public static function factory($config) 53 | { 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /docs/api/html/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Overview 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 |

FireGento_Logger

32 |

Software Documentation

33 |

Welcome to the Software Documentation homepage.

34 |
35 |
36 |

Build

37 |

38 |

VCS Info

39 |

40 | tag:
41 | branch:

42 |

Used Enrichers

43 |

44 |

45 |
46 |
47 |
48 |

Warning: PHPLoc enrichment not enabled or phploc.xml not found.

49 |
50 |
51 |
52 | 53 |
54 | 55 | 56 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/System/Config/Source/Targets.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Logging Targets 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Model_System_Config_Source_Targets 29 | { 30 | /** 31 | * @var array Options 32 | */ 33 | protected $_options = array(); 34 | 35 | /** 36 | * Retrieve all targets as option arry 37 | * 38 | * @return array Targets 39 | */ 40 | public function toOptionArray() 41 | { 42 | if (!$this->_options) { 43 | foreach (Mage::app()->getConfig()->getNode('global/log/core/writer_models')->children() as $writer) { 44 | $module = isset($writer->label['module']) ? $writer->label['module'] : 'firegento_logger'; 45 | $label = Mage::helper($module)->__((string)$writer->label); 46 | $this->_options[] = array('label' => $label, 'value' => $writer->getName()); 47 | } 48 | } 49 | 50 | return $this->_options; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Block/Adminhtml/LiveView.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Block for live viewing the log files in the backend 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Block_Adminhtml_LiveView extends Mage_Adminhtml_Block_Template 29 | { 30 | /** 31 | * Method reads all log-Files in the var/log-folder 32 | * 33 | * @return array 34 | */ 35 | public function getLogFiles() 36 | { 37 | $logFiles = array(); 38 | $logFolderPath = Mage::getBaseDir('var') . DS . 'log'; 39 | 40 | if (!file_exists($logFolderPath)) { 41 | mkdir($logFolderPath, 0755, true); 42 | } 43 | 44 | $directory = new DirectoryIterator($logFolderPath); 45 | 46 | foreach ($directory as $fileInfo) { 47 | if (!$fileInfo->isFile() || !preg_match('/\.(?:log)$/', $fileInfo->getFilename())) { 48 | continue; 49 | } 50 | 51 | $logFiles[] = $fileInfo->getFilename(); 52 | } 53 | 54 | return $logFiles; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/lib/sentry/lib/Raven/Processor/SanitizeHttpHeadersProcessor.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | final class Raven_Processor_SanitizeHttpHeadersProcessor extends Raven_Processor 19 | { 20 | /** 21 | * @var string[] $httpHeadersToSanitize The list of HTTP headers to sanitize 22 | */ 23 | private $httpHeadersToSanitize = array(); 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function __construct(Raven_Client $client) 29 | { 30 | parent::__construct($client); 31 | } 32 | 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public function setProcessorOptions(array $options) 37 | { 38 | $this->httpHeadersToSanitize = array_merge($this->getDefaultHeaders(), isset($options['sanitize_http_headers']) ? $options['sanitize_http_headers'] : array()); 39 | } 40 | 41 | /** 42 | * {@inheritdoc} 43 | */ 44 | public function process(&$data) 45 | { 46 | if (isset($data['request']) && isset($data['request']['headers'])) { 47 | foreach ($data['request']['headers'] as $header => &$value) { 48 | if (in_array($header, $this->httpHeadersToSanitize)) { 49 | $value = self::STRING_MASK; 50 | } 51 | } 52 | } 53 | } 54 | 55 | /** 56 | * Gets the list of default headers that must be sanitized. 57 | * 58 | * @return string[] 59 | */ 60 | private function getDefaultHeaders() 61 | { 62 | return array('Authorization', 'Proxy-Authorization', 'X-Csrf-Token', 'X-CSRFToken', 'X-XSRF-TOKEN'); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/lib/Airbrake/Connection.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright (c) 2011-2013 Drew Butler 10 | * @license http://www.opensource.org/licenses/mit-license.php 11 | */ 12 | class Connection 13 | { 14 | protected $configuration = null; 15 | protected $headers = array(); 16 | 17 | /** 18 | * Build the object with the airbrake Configuration. 19 | * 20 | * @param Airbrake\Configuration $configuration 21 | */ 22 | public function __construct(Configuration $configuration) 23 | { 24 | $this->configuration = $configuration; 25 | 26 | $this->addHeader(array( 27 | 'Accept: text/xml, application/xml', 28 | 'Content-Type: text/xml' 29 | )); 30 | } 31 | 32 | /** 33 | * Add a header to the connection. 34 | * 35 | * @param string header 36 | */ 37 | public function addHeader($header) 38 | { 39 | $this->headers += (array)$header; 40 | } 41 | 42 | /** 43 | * @param Airbrake\Notice $notice 44 | * @return string 45 | **/ 46 | public function send(Notice $notice) 47 | { 48 | $curl = curl_init(); 49 | 50 | $xml = $notice->toXml($this->configuration); 51 | 52 | curl_setopt($curl, CURLOPT_URL, $this->configuration->apiEndPoint); 53 | curl_setopt($curl, CURLOPT_POST, 1); 54 | curl_setopt($curl, CURLOPT_HEADER, 0); 55 | curl_setopt($curl, CURLOPT_TIMEOUT, $this->configuration->timeout); 56 | curl_setopt($curl, CURLOPT_POSTFIELDS, $xml); 57 | curl_setopt($curl, CURLOPT_HTTPHEADER, $this->headers); 58 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 59 | curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); 60 | curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); 61 | 62 | $return = curl_exec($curl); 63 | curl_close($curl); 64 | 65 | return $return; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/Resource/Db/Entry.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Db Entry Resource Model 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Model_Resource_Db_Entry extends Mage_Core_Model_Resource_Db_Abstract 29 | { 30 | /** 31 | * Init main table and id field name 32 | */ 33 | public function _construct() 34 | { 35 | $this->_init('firegento_logger/db_entry', 'entity_id'); 36 | } 37 | 38 | /** 39 | * Clean the log table 40 | * 41 | * @param int $keepDays Days to keep 42 | * @return int The number of deleted rows 43 | */ 44 | public function cleanLogs($keepDays) 45 | { 46 | if (!$keepDays) { 47 | return 0; 48 | } 49 | 50 | $time = Mage::getModel('core/date')->gmtTimestamp() - (60 * 60 * 24 * $keepDays); 51 | $delete = Varien_Date::formatDate($time, false); 52 | 53 | return $this->_getWriteAdapter()->delete( 54 | $this->getMainTable(), 55 | $this->_getWriteAdapter()->quoteInto('timestamp < ?', $delete) 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Block_Adminhtml_System_Config_Targetmap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_System_Config_Source_Prioritydefault.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Model_Chromelogger.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/api/xml/classes/FireGento_Logger_Shell.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/System/Config/Source/Priorities.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Log priorities 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Model_System_Config_Source_Priorities 29 | { 30 | /** 31 | * Retrieve all priority options 32 | * 33 | * @return array Priorities 34 | */ 35 | public function toOptionArray() 36 | { 37 | $helper = Mage::helper('firegento_logger'); 38 | 39 | return array( 40 | array('label' => $helper->__('Emergency'), 'value' => (string)Zend_Log::EMERG), 41 | array('label' => $helper->__('Alert'), 'value' => Zend_Log::ALERT), 42 | array('label' => $helper->__('Critical'), 'value' => Zend_Log::CRIT), 43 | array('label' => $helper->__('Error'), 'value' => Zend_Log::ERR), 44 | array('label' => $helper->__('Warning'), 'value' => Zend_Log::WARN), 45 | array('label' => $helper->__('Notice'), 'value' => Zend_Log::NOTICE), 46 | array('label' => $helper->__('Info'), 'value' => Zend_Log::INFO), 47 | array('label' => $helper->__('Debug'), 'value' => Zend_Log::DEBUG), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Block/Adminhtml/System/Config/Renderer/Select.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Target Map Select Field Block for system config 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Block_Adminhtml_System_Config_Renderer_Select 29 | extends Mage_Core_Block_Abstract 30 | { 31 | /** 32 | * Return the select html 33 | * 34 | * @return string 35 | */ 36 | protected function _toHtml() 37 | { 38 | $htmlId = $this->getColumnName() . '#{_id}'; 39 | $select = new Varien_Data_Form_Element_Select(array( 40 | 'html_id' => $htmlId, 41 | 'no_span' => true, 42 | 'name' => $this->getInputName(), 43 | )); 44 | $select->addData($this->getColumn()); 45 | $select->setForm(new Varien_Object()); 46 | $select->setValues($this->getValues()); 47 | 48 | // Escape properly and use javascript to set the selected values 49 | $javascriptHtml = " 50 | {$select->getElementHtml()} 51 | 54 | "; 55 | return str_replace(array("\n", '"', '/'), array('', '\"', '\/'), $javascriptHtml); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/lib/sentry/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | sudo: false 3 | 4 | php: 5 | - 5.4 6 | - 5.5 7 | - 5.6 8 | - 7.0 9 | - 7.1 10 | - 7.2 11 | - nightly 12 | env: 13 | - REMOVE_XDEBUG="0" 14 | - REMOVE_XDEBUG="1" 15 | 16 | matrix: 17 | allow_failures: 18 | - php: hhvm-3.12 19 | - php: nightly 20 | fast_finish: true 21 | include: 22 | - php: hhvm-3.12 23 | env: REMOVE_XDEBUG="0" HHVM="1" 24 | - php: 5.3 25 | env: REMOVE_XDEBUG="0" 26 | dist: precise 27 | - php: 5.3 28 | env: REMOVE_XDEBUG="1" 29 | dist: precise 30 | 31 | cache: 32 | directories: 33 | - $HOME/.composer/cache 34 | 35 | before_install: 36 | - if [ "$REMOVE_XDEBUG" = "1" ]; then phpenv config-rm xdebug.ini; fi 37 | - composer self-update 38 | 39 | install: travis_retry composer install --no-interaction --prefer-dist 40 | 41 | script: 42 | - composer phpcs 43 | - composer tests-travis 44 | 45 | after_script: 46 | - wget https://scrutinizer-ci.com/ocular.phar 47 | - if [ $(phpenv version-name) = "5.3" ] && [ "$REMOVE_XDEBUG" = "0" ]; then php ocular.phar code-coverage:upload --format=php-clover test/clover.xml --revision=$TRAVIS_COMMIT; fi 48 | - if [ $(phpenv version-name) = "5.4" ] && [ "$REMOVE_XDEBUG" = "0" ]; then php ocular.phar code-coverage:upload --format=php-clover test/clover.xml --revision=$TRAVIS_COMMIT; fi 49 | - if [ $(phpenv version-name) = "5.5" ] && [ "$REMOVE_XDEBUG" = "0" ]; then php ocular.phar code-coverage:upload --format=php-clover test/clover.xml --revision=$TRAVIS_COMMIT; fi 50 | - if [ $(phpenv version-name) = "5.6" ] && [ "$REMOVE_XDEBUG" = "0" ]; then php ocular.phar code-coverage:upload --format=php-clover test/clover.xml --revision=$TRAVIS_COMMIT; fi 51 | - if [ $(phpenv version-name) = "7.0" ] && [ "$REMOVE_XDEBUG" = "0" ]; then php ocular.phar code-coverage:upload --format=php-clover test/clover.xml --revision=$TRAVIS_COMMIT; fi 52 | - if [ $(phpenv version-name) = "7.1" ] && [ "$REMOVE_XDEBUG" = "0" ]; then php ocular.phar code-coverage:upload --format=php-clover test/clover.xml --revision=$TRAVIS_COMMIT; fi 53 | - if [ $(phpenv version-name) = "7.2" ] && [ "$REMOVE_XDEBUG" = "0" ]; then php ocular.phar code-coverage:upload --format=php-clover test/clover.xml --revision=$TRAVIS_COMMIT; fi 54 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/System/Config/Source/SyslogFacilities.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright Lee Saferite 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Syslog Facilities 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author Lee Saferite 27 | */ 28 | class FireGento_Logger_Model_System_Config_Source_SyslogFacilities 29 | { 30 | /** 31 | * @return array 32 | */ 33 | public function toOptionArray() 34 | { 35 | $facilities = array(); 36 | 37 | $constants = array( 38 | 'LOG_AUTH', 39 | 'LOG_AUTHPRIV', 40 | 'LOG_CRON', 41 | 'LOG_DAEMON', 42 | 'LOG_KERN', 43 | 'LOG_LOCAL0', 44 | 'LOG_LOCAL1', 45 | 'LOG_LOCAL2', 46 | 'LOG_LOCAL3', 47 | 'LOG_LOCAL4', 48 | 'LOG_LOCAL5', 49 | 'LOG_LOCAL6', 50 | 'LOG_LOCAL7', 51 | 'LOG_LPR', 52 | 'LOG_MAIL', 53 | 'LOG_NEWS', 54 | 'LOG_SYSLOG', 55 | 'LOG_USER', 56 | 'LOG_UUCP' 57 | ); 58 | 59 | foreach ($constants as $constant) { 60 | if (defined($constant)) { 61 | $facilities[] = array( 62 | 'label' => $constant, 63 | 'value' => constant($constant) 64 | ); 65 | } 66 | } 67 | 68 | return $facilities; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/JsonStream.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Like ZLWStream but overrides the formatter to use the advanced formatter 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Model_JsonStream extends Zend_Log_Writer_Stream 29 | { 30 | /** 31 | * @var bool 32 | */ 33 | protected $_enableBacktrace = false; 34 | 35 | /** 36 | * Setter for class variable _enableBacktrace 37 | * 38 | * @param bool $flag Flag for Backtrace 39 | */ 40 | public function setEnableBacktrace($flag) 41 | { 42 | $this->_enableBacktrace = $flag; 43 | } 44 | 45 | /** 46 | * Write a message to the log. 47 | * 48 | * @param array $event Event Data 49 | * @throws Zend_Log_Exception 50 | */ 51 | protected function _write($event) 52 | { 53 | $event = Mage::helper('firegento_logger')->getEventObjectFromArray($event); 54 | Mage::helper('firegento_logger')->addEventMetadata($event, NULL, $this->_enableBacktrace); 55 | $eventData = $event->getEventDataArray(); 56 | $eventData = array_filter($eventData, function ($var) { return $var !== null; }); 57 | $line = @json_encode($eventData); 58 | 59 | if (false === @fwrite($this->_stream, $line . PHP_EOL)) { 60 | //require_once 'Zend/Log/Exception.php'; 61 | throw new Zend_Log_Exception("Unable to write to stream"); 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Block/Adminhtml/System/Config/EmailNotificationRule.php: -------------------------------------------------------------------------------- 1 | 18 | * @copyright 2013 FireGento Team (http://www.firegento.com) 19 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 20 | */ 21 | /** 22 | * Backend configuration to setup email rules. 23 | * 24 | * @category FireGento 25 | * @package FireGento_Logger 26 | * @author FireGento Team 27 | */ 28 | class FireGento_Logger_Block_Adminhtml_System_Config_EmailNotificationRule 29 | extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract 30 | { 31 | /** 32 | * Prepare fields to render 33 | */ 34 | protected function _prepareToRender() 35 | { 36 | $this->addColumn('pattern', array( 37 | 'label' => Mage::helper('firegento_logger')->__('Pattern'), 38 | 'style' => 'width:150px', 39 | )); 40 | 41 | $severityRenderer = new FireGento_Logger_Block_Adminhtml_System_Config_Renderer_Select(); 42 | $severityRenderer->setValues( 43 | Mage::getSingleton('firegento_logger/system_config_source_prioritydefault')->toOptionArray() 44 | ); 45 | $this->addColumn('severity', array( 46 | 'label' => Mage::helper('firegento_logger')->__('Severity'), 47 | 'style' => 'width:100px', 48 | 'renderer' => $severityRenderer, 49 | )); 50 | 51 | $this->addColumn('email_list_csv', array( 52 | 'label' => Mage::helper('firegento_logger')->__('Email(s)'), 53 | 'style' => 'width:150px', 54 | )); 55 | 56 | $this->_addButtonLabel = Mage::helper('firegento_logger')->__('Add Notification Rule'); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /docs/api/xml/classes/SyslogFacility.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_BOSH/__process.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_BOSH::__process

62 |

63 |

64 |

Signature

65 |
66 | public function __process() 67 | 68 |
69 |
70 |
71 |
72 | 73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/api/html/classes/Roster/getRoster.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

Roster::getRoster

62 |

Get roster

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function getRoster() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_BOSH/loadSession.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_BOSH::loadSession

62 |

63 |

64 |

Signature

65 |
66 | public function loadSession() 67 | 68 |
69 |
70 |
71 |
72 | 73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_BOSH/saveSession.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_BOSH::saveSession

62 |

63 |

64 |

Signature

65 |
66 | public function saveSession() 67 | 68 |
69 |
70 |
71 |
72 | 73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMLStream/time.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMLStream::time

62 |

63 |

64 |

Signature

65 |
66 | public function time() 67 | 68 |
69 |
70 |
71 |
72 | 73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /src/app/code/community/FireGento/Logger/Model/Chromelogger.php: -------------------------------------------------------------------------------- 1 | 16 | * @copyright 2013 FireGento Team (http://www.firegento.com) 17 | * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) 18 | */ 19 | require_once 'chromelogger' . DS . 'ChromePHP.php'; 20 | /** 21 | * Model for Chrome logging 22 | * 23 | * @category FireGento 24 | * @package FireGento_Logger 25 | * @author FireGento Team 26 | */ 27 | class FireGento_Logger_Model_Chromelogger extends FireGento_Logger_Model_Abstract 28 | { 29 | 30 | /** 31 | * Write the data 32 | * 33 | * @param array $event Event Data 34 | */ 35 | public function _write($event) 36 | { 37 | $event = Mage::helper('firegento_logger')->getEventObjectFromArray($event); 38 | 39 | $priority = $event->getPriority(); 40 | $message = $this->_formatter->format($event); 41 | 42 | if ($priority !== false) { 43 | switch ($priority) 44 | { 45 | case Zend_Log::EMERG: 46 | case Zend_Log::ALERT: 47 | case Zend_Log::CRIT: 48 | case Zend_Log::ERR: 49 | ChromePhp::error($message); 50 | break; 51 | case Zend_Log::WARN: 52 | ChromePhp::warn($message); 53 | break; 54 | case Zend_Log::NOTICE: 55 | case Zend_Log::INFO: 56 | case Zend_Log::DEBUG: 57 | ChromePhp::info($message); 58 | break; 59 | default: 60 | Mage::log('Unknown loglevel at ' . __CLASS__); 61 | break; 62 | } 63 | } else { 64 | Mage::log('Attached message event has no priority - skipping !'); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_BOSH/__parseBuffer.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_BOSH::__parseBuffer

62 |

63 |

64 |

Signature

65 |
66 | public function __parseBuffer() 67 | 68 |
69 |
70 |
71 |
72 | 73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/api/html/classes/ChromePhp/group.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

ChromePhp::group

62 |

sends a group log

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function group() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/ChromePhp/table.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

ChromePhp::table

62 |

sends a table log

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function table() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/ChromePhp/groupEnd.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

ChromePhp::groupEnd

62 |

ends a group log

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function groupEnd() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/ChromePhp/__construct.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

ChromePhp::__construct

62 |

constructor

63 |

64 |

    65 |

    Signature

    66 |
    67 | private function __construct() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMPP/getRoster.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMPP::getRoster

62 |

Retrieves the roster

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function getRoster() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMLStream/read.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMLStream::read

62 |

Read from socket

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function read() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMLStream/readyToProcess.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMLStream::readyToProcess

62 |

63 |

64 |

Signature

65 |
66 | public function readyToProcess() 67 | 68 |
69 |
70 |
71 |
72 | 73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMLStream/reset.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMLStream::reset

62 |

Reset connection

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function reset() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/FireGento_Logger_Shell/run.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

FireGento_Logger_Shell::run

62 |

Run shell script

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function run() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/ChromePhp/groupCollapsed.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

ChromePhp::groupCollapsed

62 |

sends a collapsed group log

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function groupCollapsed() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMLStream/disconnect.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMLStream::disconnect

62 |

Disconnect from XMPP Host

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function disconnect() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMLStream/doReconnect.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMLStream::doReconnect

62 |

Reconnect XMPP Host

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function doReconnect() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMLStream/setupParser.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMLStream::setupParser

62 |

Setup the XML parser

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function setupParser() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/FireGento_Logger_Shell/runClean.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

FireGento_Logger_Shell::runClean

62 |

Clean logs

63 |

64 |

    65 |

    Signature

    66 |
    67 | protected function runClean() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/XMPPHP_XMLStream/__destruct.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

XMPPHP_XMLStream::__destruct

62 |

Destructor Cleanup connection

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function __destruct() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/source/app/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Overview 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 40 |
41 |

Source of FireGento_Logger

42 |

43 | This project consists of 35 directories, containing 44 | a total of 56 files. 45 |

46 |
    47 |
  • 48 | Source 49 |
  • 50 |
  •  app
  • 51 |
52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 64 | 65 | 66 | 67 | 68 | 72 | 73 |
NameSizeLast Modified
60 | 61 | code 62 | 63 |   
69 | 70 | Total: 1 directories, 71 |
74 |
75 |
76 | 77 |
78 | 79 | 80 | -------------------------------------------------------------------------------- /src/lib/sentry/bin/sentry: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getMessage()); 31 | } 32 | 33 | $client = new Raven_Client($dsn, array( 34 | 'trace' => true, 35 | 'curl_method' => 'sync', 36 | 'app_path' => realpath(__DIR__ . '/..'), 37 | 'base_path' => realpath(__DIR__ . '/..'), 38 | )); 39 | 40 | $config = get_object_vars($client); 41 | $required_keys = array('server', 'project', 'public_key', 'secret_key'); 42 | 43 | echo "Client configuration:\n"; 44 | foreach ($required_keys as $key) { 45 | if (empty($config[$key])) { 46 | exit("ERROR: Missing configuration for $key"); 47 | } 48 | if (is_array($config[$key])) { 49 | echo "-> $key: [".implode(", ", $config[$key])."]\n"; 50 | } else { 51 | echo "-> $key: $config[$key]\n"; 52 | } 53 | 54 | } 55 | echo "\n"; 56 | 57 | echo "Sending a test event:\n"; 58 | 59 | $ex = raven_cli_test("command name", array("foo" => "bar")); 60 | $event_id = $client->captureException($ex); 61 | 62 | echo "-> event ID: $event_id\n"; 63 | 64 | $last_error = $client->getLastError(); 65 | if (!empty($last_error)) { 66 | exit("ERROR: There was an error sending the test event:\n " . $last_error); 67 | } 68 | 69 | echo "\n"; 70 | echo "Done!"; 71 | } 72 | 73 | 74 | function main() { 75 | global $argv; 76 | 77 | if (!isset($argv[1])) { 78 | exit('Usage: sentry test '); 79 | } 80 | 81 | $cmd = $argv[1]; 82 | 83 | switch ($cmd) { 84 | case 'test': 85 | cmd_test(@$argv[2]); 86 | break; 87 | default: 88 | exit('Usage: sentry test '); 89 | } 90 | } 91 | 92 | main(); 93 | -------------------------------------------------------------------------------- /docs/api/html/classes/FireGento_Logger_Shell/runRotate.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

FireGento_Logger_Shell::runRotate

62 |

Rotate log files

63 |

64 |

    65 |

    Signature

    66 |
    67 | protected function runRotate() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/source/shell/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Overview 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 40 |
41 |

Source of FireGento_Logger

42 |

43 | This project consists of 35 directories, containing 44 | a total of 56 files. 45 |

46 |
    47 |
  • 48 | Source 49 |
  • 50 |
  •  shell
  • 51 |
52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 64 | 65 | 66 | 67 | 71 | 72 |
NameSizeLast Modified
60 | logger.php 61 | 2.8 KB 63 | 2015-01-24T18:41:17+00:00
68 | 69 | Total: 1 files 70 |
73 |
74 |
75 | 76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /docs/api/html/classes/FireGento_Logger_Shell/runTestMessage.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

FireGento_Logger_Shell::runTestMessage

62 |

Log a test message

63 |

64 |

    65 |

    Signature

    66 |
    67 | protected function runTestMessage() 68 | 69 |
    70 |
71 |
72 |
73 | 74 |
75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/api/html/classes/Exception/__clone.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

Exception::__clone

62 |

Clone the exception

63 |

64 |

    65 |

    Signature

    66 |
    67 | function __clone() 68 | 69 |
    70 |

    Returns

    71 |
    72 |
    void
    73 |
    74 |
    75 |
76 |
77 |
78 | 79 |
80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/api/html/classes/Exception/getCode.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

Exception::getCode

62 |

Gets the Exception code

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function getCode() 68 | 69 |
    70 |

    Returns

    71 |
    72 |
    mixed
    73 |
    74 |
    75 |
76 |
77 |
78 | 79 |
80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/api/html/classes/Exception/getTrace.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

Exception::getTrace

62 |

Gets the stack trace

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function getTrace() 68 | 69 |
    70 |

    Returns

    71 |
    72 |
    array
    73 |
    74 |
    75 |
76 |
77 |
78 | 79 |
80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/api/html/classes/Exception/getMessage.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

Exception::getMessage

62 |

Gets the Exception message

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function getMessage() 68 | 69 |
    70 |

    Returns

    71 |
    72 |
    string
    73 |
    74 |
    75 |
76 |
77 |
78 | 79 |
80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/api/html/classes/Exception/getFile.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phpDox - Test Method 6 | 7 | 8 | 9 | 10 | 29 |
30 |
31 | 46 |
47 | 60 |
61 |

Exception::getFile

62 |

Gets the file in which the exception occurred

63 |

64 |

    65 |

    Signature

    66 |
    67 | public function getFile() 68 | 69 |
    70 |

    Returns

    71 |
    72 |
    string
    73 |
    74 |
    75 |
76 |
77 | 80 | 81 | 82 | --------------------------------------------------------------------------------