Linked Questions

0 votes
1 answer
134 views

How to create a separate log file to print the admin details who deletes a customer profile? [duplicate]

I want to create a new log file which will print the admin details who deletes a customer profile from admin panel in magento 2. How can I do that?
Naiwrita09's user avatar
143 votes
22 answers
317k views

Magento 2: Replacement for Mage::log method?

In Magento 1, if you wanted to send a message to the logs, you'd use a static method on the global Mage class. Mage::log($message, Zend_Log::DEBUG, "my-log-file.log"); Is there an ...
Alana Storm's user avatar
  • 44.4k
5 votes
3 answers
11k views

Magento 2 custom logger 'Missing required argument $name'

I'm trying to create a custom logger, so I can log to a custom log file. I've looked at and followed multiple tutorials that all say the same, however I keep getting the same error. Tutorials that I ...
dbrekelmans's user avatar
0 votes
1 answer
6k views

Magento2: What is the process to create custom logger [duplicate]

How I can create my own custom logger in magento2 ? In Magento 1, We simply write own custom log with the following code: Mage::log("Log Message", null, "log_file.log");
Deepak MageDivine's user avatar
2 votes
1 answer
3k views

Zend Logger - Dependency injection with required parameters

I want to log info to a specific file in magento2. This does the job: $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log'); $logger = new \Zend\Log\Logger(); $logger->addWriter($writer)...
Claudiu Creanga's user avatar
2 votes
2 answers
3k views

How to change default file log name in Magento 2 in Psr Logger?

I have an instance of a logger in my PHP script that I use. I instantiate it like this: $logger = $om->get("Psr\Log\LoggerInterface"); I can log text like this: $logger->debug("caruk"); but ...
Vladimir Despotovic's user avatar
1 vote
3 answers
2k views

How to create custom log file in magento 2

Can anyone help me in creating custom logger file in mmagento 2. I want to display collection object in log file. So far, i have tried this code but did not work. getting $collection object from ...
Nafsss's user avatar
  • 760
1 vote
1 answer
2k views

Where to find Payment Log file in Magento 2?

I want to check if there is any failed transactions occurred on our site. I'm aware that this detail can get from Payment Log file but for my case, there is no Payment Log file is available under var/...
Siva's user avatar
  • 1,120
0 votes
2 answers
871 views

Magento 2 - Create a log file in plugin that will print log when data is inserted in database

I have entered data in the database using object Manager in Model file itself. I want to print a log file from the plugin that will print the log of the last data that is inserted in the database.
Naiwrita09's user avatar
0 votes
2 answers
579 views

How to generate custom log file in magento 2?

I have tried generating custom log file using helper and logger but the file did not generate.
Magento Inquiry's user avatar
0 votes
1 answer
470 views

Creating event and observer for an action at backend of Magento 2 [duplicate]

How to create an custom event and observer for that event at backend in Magento2. For example I want to create an event that whenever an admin deletes a customer profile a separate log file is ...
Naiwrita09's user avatar
0 votes
1 answer
342 views

PHP 7: How to create a separate log file in PHP to log only the order data(Order info retrieved from an Magento Order object)?

I have an application developed to manage the orders, vendors and many more things. The default error_log() functionality has already been in use across the application coded in PHP to log not only ...
CodeForGood's user avatar
1 vote
1 answer
150 views

Not all errors are displayed in var/log

I'm on developer mode, with a whm installed server with different cpanel accounts, our production website is on developer mode but sometimes for some products the checkout cart page show a blank page, ...
tarek fellah's user avatar