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 :: what is forelse in laravel 
Php :: php get first last loop 
Php :: php ini ubuntu 
Php :: how to use required_with in laravel to array element 
Php :: laravel clear cache 
Php :: laravel check collection has key 
Php :: php see if undefined 
Php :: Limit Product Name in Magento2 
Php :: get the last saved row in a table laravel 
Php :: php ucwords 
Php :: fore install debian 10 php 7.3 
Php :: ext-bcmath php 8.0 install 
Php :: laravel generate unique token 
Php :: laravel get full url with parameters 
Php :: carbon to mysql datetime 
Php :: file_get_contents url fail 
Php :: Add 2 hours to current time in cakephp 
Php :: Creating a Basic Route in Laravel 8 
Php :: change php version in vagrant 
Php :: php array common element 
Php :: Database//Eloquent//Model.php laravel errror array t- string conversion 
Php :: WP_DEBUG enable 
Php :: get last id in laravel 
Php :: migration status php 
Php :: get post by taxonomy 
Php :: php capital string 
Php :: collection empty laravel 
Php :: php permanent redirect to url 
Php :: browser detection php 
Php :: php contains substring 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =