コード例 #1
0
 public function getQueueProcessor($errorConfigFilePath, $elasticSearchConfigFilePath, $logDirPath)
 {
     $queueErrorLogger = ErrorLoggerFactory::getInstance()->getErrorLogger('queue');
     $validatorFactory = ValidatorFactory::getInstance();
     $middlewareChain = MiddlewareChainFactory::getInstance()->getChain($errorConfigFilePath);
     $logBuilder = new Builder();
     $dataManager = DataManagerFactory::getInstance()->getDataManager($elasticSearchConfigFilePath);
     $activityLogger = LoggerFactory::getInstance()->getFileLogger('ErrorLogProcessor', $logDirPath);
     return new QueueProcessor($queueErrorLogger, $validatorFactory, $middlewareChain, $logBuilder, $dataManager, $activityLogger);
 }
コード例 #2
0
           width: "1440",
           height: "900"
       }
   },

   exceptions: [                                       [Required]
       {
           tag: "srp",                                 [Required]
           count: 1,                                   [Optional. Default value: 1]
           timestamp: 1431994922,                      [app:Required. browser:NotRequired. server:Optional]
           type: "MathException",                      [Required]
           message: "Division by zero error",          [Optional]
           code: 5,                                    [Optional]
           file: "Example.java",                       [Optional]
           line: 23,                                   [Optional]
           stackTrace: "Exception in thread "main"\    [app:Required. browser:Optional. server:Required] //
java.lang.NullPointerException\
at com.example.myproject.Book.getTitle(Book.java:16)\
at com.example.myproject.Author.getBookTitles(Author.java:25)""
       }
   }
}
*/
namespace NewMonk\web;

require_once __DIR__ . '/../config/config.php';
use NewMonk\lib\error\logger\Factory;
header('HTTP/1.0 204 No Content');
$errorLogs = isset($_REQUEST['errorLogs']) ? $_REQUEST['errorLogs'] : file_get_contents('php://input');
$errorLogger = Factory::getInstance()->getErrorLogger('queue');
$errorLogger->saveLogs($errorLogs);