<?php
2/**
3* Registro de logs e erros
4*
5* @package Core/Utils
6* @author Lucas/Postali
7*/
8 namespace Utils;
9
10 trait Log
11 {
12 /**
13 * [FUNÇÃO MOVIDA. PERMANECE PARA RETROCOMPATIBILIDADE]
14 * Registra e exibe um erro fatal
15 *
16 * @param string $message Recebe a mensagem a ser inserida dentro do arquivo
17 * @param boolean $showInFronted Enviar true caso queira exibir o erro na tela para o usuário
18 * @return null
19 */
20 public function Error ($message, $showInFronted = true, $frontendMessage = null, $details = null)
21 {
22 Error($message, $showInFronted);
23 }
24
25 /**
26 * Registra uma informação no log
27 *
28 * @param string $message Recebe a mensagem a ser inserida dentro do arquivo
29 * @return null
30 */
31 static public function Log ($message)
32 {
33 $content = (is_string($message) || is_numeric($message) || $message instanceof Fault) ? $message : var_export($message, true);
34
35 writeLog($content);
36 }
37 }
You can see detailed error trace in the console.
render ()
/home/mpagro/domains/loja.mpagro.com.br/public_html/index.php 19
_processContent ()
/home/mpagro/domains/loja.mpagro.com.br/public_html/Modules/Core/Navigation/Page.php 401
Error ('The file for block \'categoria-novidades\' doesn\'t exist.',
true)
/home/mpagro/domains/loja.mpagro.com.br/public_html/Modules/Core/Navigation/Page.php 304
Error ('The file for block \'categoria-novidades\' doesn\'t exist.',
true)
/home/mpagro/domains/loja.mpagro.com.br/public_html/Modules/Core/Utils/Log.php 22
You can see detailed error trace in the console.
main
System ready
'/home/mpagro/domains/loja.mpagro.com.br/public_html'
web
Starting session
true
web
Starting web module
''
Culture
Auto discovering culture
NULL
Culture
Setting culture
'Internacional'
Navigation\Navigation
Setting Navigation default timezone
'UTC'
Navigation\Navigation
Setting Navigation default language
false
web
User
'18.97.14.89'
Navigation\Navigation
Interpreting URI
'novidades'
Navigation\Page
Instancing using class 'ShopperMethod\Shopper'
'ShopperMethod\\Shopper'
Navigation\Tags
Including asset
'vue'
Navigation\Tags
Including asset
'tools'
Navigation\Tags
Including asset
'shopper'
Navigation\Page
Incorporating transactional functions from class 'ShopperMethod\Shopper'
array ( 0 => 'listCustomerDatatable', 1 => 'validateEmail', 2 => 'saveCustomer', 3 => 'createCustomer', 4 => 'removeCustomer', 5 => 'customerLogin', 6 => 'customerLogout', 7 => 'customerCreate', 8 => 'customerRecoverPassword', 9 => 'customerRecoverPasswordFirst', 10 => 'customerResetPassword', 11 => 'getCustomerOrders', 12 => 'listOrdersCliente', 13 => 'cartRemoveItem', 14 => 'cartAddItem', 15 => 'cartUpdateOrder', 16 => 'cartAddCoupon', 17 => 'cartRemoveCoupon', 18 => 'cartPaymentMethods', 19 => 'cartTransportMethods', 20 => 'itemTransportMethods', 21 => 'cartProcessPayment', )
Navigation\Page
Won't re-instance using class 'ShopperMethod\Shopper'
'ShopperMethod\\Shopper'
Navigation\Page
Won't re-instance using class 'ShopperMethod\Shopper'
'ShopperMethod\\Shopper'