Search
 
SCRIPT & CODE EXAMPLE
 

PHP

mage log magento 2

<?php /* for Magento 2.4 */
  $writer = new end_Log_Writer_Stream(BP . '/var/log/custom.log');
  $logger = new end_Log();
  $logger->addWriter($writer);
  $logger->info('Text Log'); //Text Log
  $logger->info('Array Log'.print_r($myArrayVar, true)); // Array Log
?>
<?php
  $writer = new endLogWriterStream(BP . '/var/log/logfile.log');
  $logger = new endLogLogger();
  $logger->addWriter($writer);
  $logger->info('Simple Text Log'); // Simple Text Log
  $logger->info('Array Log'.print_r($myArrayVar, true)); // Array Log
?>
  
Comment

mage log magento 2

<?php /* for Magento 2.4 */
  $writer = new end_Log_Writer_Stream(BP . '/var/log/custom.log');
  $logger = new end_Log();
  $logger->addWriter($writer);
  $logger->info('Text Log'); //Text Log
  $logger->info('Array Log'.print_r($myArrayVar, true)); // Array Log
?>
Comment

logger magento2

$writer = new endLogWriterStream(BP . '/var/log/test.log');
$logger = new endLogLogger();
$logger->addWriter($writer);
$logger->info('Your text message');
Comment

log magento 1

Mage::log('message',null,'logfile.log',true);
Mage::log(print_r($arr, 1), null, 'logfile.log',true);
Comment

log magento 1

Mage::log('message',null,'nam.log',true);
Comment

mage log equivalent magento 2

MagentoFrameworkAppObjectManager::getInstance()->get(PsrLogLoggerInterface::class)->debug('Your message here');
Comment

PREVIOUS NEXT
Code Example
Php :: echo pre print_r 
Php :: laravel query not null 
Php :: check laravel version 
Php :: laravel get project root 
Php :: uninstall php 8 mac 
Php :: laravel Str::random 
Php :: php date plus days 
Php :: php json pretty print 
Php :: php sigmoid function 
Php :: php filter validate email 
Php :: the requested PHP extension curl is missing from your system. 
Php :: php get last modified date of file 
Php :: forget or remove a session in laravel 
Php :: laravel artisan create criteria 
Php :: woocommerce product image zoom on hover disable 
Php :: storage link laravel 
Php :: php get string after character 
Php :: refresh seeder laravel 
Php :: php artisan php warning require 
Php :: laravel check if array is empty 
Php :: php remove cookie 
Php :: convert one time zone datetime value to another using php 
Php :: php extract time from datetime 
Php :: php date format minus 1 day 
Php :: ubuntu update php 7.4 to 8 
Php :: ubuntu 20.04 how to install npm 
Php :: php remove last element array 
Php :: php array start with index 0 
Php :: error log array 
Php :: how to set timezone for iran in laravel 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =