Skip to main content

Questions tagged [logging]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

Magento Commerce Cloud (Adobe Commerce Cloud) : Missing logs in debug.log

I have added logs in one of our controller using following code; \Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class)->debug('my log'); Sometimes the logs ...
Vivek Kumar's user avatar
  • 5,685
0 votes
2 answers
61 views

How to debug or enable logging in a function

Is there a way to enable logging, and or debug this function in Magento? The invoices is created successfully, but the capture online doesn't work. private function createInvoice(Order $order, int $...
Aknot's user avatar
  • 288
1 vote
1 answer
595 views

Class Magento\NewRelicReporting\Model\Config does not exist in 2.4.4

After upgrading from Magento 2.4.3-p1 to 2.4.4, I am getting the following error: In ClassReader.php line 57: Impossible to process constructor argument Parameter #0 [ <required> Magento\...
Jacob Brown's user avatar
0 votes
1 answer
219 views

How to make a custom logger with append functionality in Magento 2?

I created a custom log for my module like this app/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
blue's user avatar
  • 128
0 votes
2 answers
436 views

Unable to Print Log

Hi i am trying to print log here but its not working file path is :- Vendor\Module\Model\Plugin\Shipping\Rate\Result\GetAllRates.php class GetAllRates { public function afterGetAllRates($...
Pramod's user avatar
  • 1,464
0 votes
1 answer
35 views

Magento2 Multistore Separate Logging Question

Is there a way to enable separate logs for each store within my Magento 2.3 set up? I am having difficulties when searching through the logs for issues pertaining to specific stores.
Petey88's user avatar
  • 47
1 vote
1 answer
154 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
0 votes
1 answer
492 views

Customer session isLoggedIn() not working properly due to the Magento Cache

I am checking if customer is logged in or not(also i have to display customer name) but sometimes it's not working and after flushing block_html cache it works. I have tried all possible solutions:- ...
Wakar Ahamad's user avatar
0 votes
1 answer
53 views

Magento 2.3 How to add customer login function for my existing Observer?

Following are the code show Premium or Non-Premium along with product name using observer, <?php namespace Gta\CustomerMsgPdp\Observer\Product; use Magento\Framework\Event\Observer; use Magento\...
zus's user avatar
  • 175
0 votes
1 answer
353 views

Magento 2.3 customer beforeAuthenticate plugin not working

I am facing allowed memory size of bytes exhausted when ever trying to login customer in magento 2.3.2 I have used beforeAuthenticate plugin to do some functionality after sometime customer can not ...
Manish Maheshwari's user avatar
3 votes
1 answer
248 views

Magento 2: Logging in a custom module

I created a new Magento 2 module and followed the injection-based logger object creation. protected $logger; public function __construct(\Psr\Log\LoggerInterface $logger) Now, when I log using ...
melchi's user avatar
  • 175
4 votes
1 answer
94 views

How to reduce logging on my live site?

In Magento 2, can I reduce the logging for my production site?
mullet's user avatar
  • 43
0 votes
1 answer
191 views

How to see inside $this object in Magento 2 logger

How can I see inside the $this object in my logger file using prs logger? I tried this \Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class)->info("in ...
summu's user avatar
  • 847
6 votes
2 answers
3k views

How to disable "Cron Job" logging into system.log file in Magento 2

My logs are being flooded with cron jobs updates. How can I disable this? [2019-02-27 06:28:02] main.INFO: Cron Job outdated_authentication_failures_cleanup is run [] [] [2019-02-27 06:28:02] main....
Greg's user avatar
  • 2,739
0 votes
2 answers
26 views

Magento 1 - Logging only works in backend

I am unable to log anything in the frontend. I added the following code in the index.php, just below Mage::run: Mage::Log('test from index.php', 7, 'test.log'); It is successfully logged if I reload ...
Black's user avatar
  • 3,390
3 votes
5 answers
2k views

Add CSS class to body if the customer is logged in magento 2

i want to add css in top menu if the customer is logged in. I tried this code in requirejs-config.js : var htmlBody = $("body[data-container='body']"); if ($(".customer-welcome").length) { ...
Developper Magento 's user avatar
0 votes
1 answer
1k views

How to track suspicious login activity in magento 2 admin panel

How i can get notifications when unauthenticated user try to login in admin panel. How i can check history of failed login with IP details?
Vipin Garg's user avatar
-1 votes
2 answers
1k views

Magento 2 : Get Customer logged in details not Working on list.phtml

The code bellow isn't working on product listing page: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customerSession = $objectManager->get('Magento\Customer\Model\...
Juliano Vargas's user avatar
2 votes
0 answers
1k views

Magento logging with AWS Cloudwatch - UTC Offset format

I'm trying to integrate Magento logs with AWS Cloudwatch. My datetime_format configuration in the awslog.conf file: datetime_format = %Y-%m-%dT%H:%M:%S%z Unfortunately, error messages occur: Fall ...
hey's user avatar
  • 1,137
0 votes
1 answer
667 views

GENERATE THIS REPORT: main.INFO: Cache file with merged layout: LAYOUT_adminhtml_STORE1_

When I call a simple block in the cms home page {{block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::html/test.phtml"}}
Divyesh's user avatar
  • 1,252
1 vote
2 answers
2k views

Custom action logging in Magento 2 EE

I'm trying to find out how to add custom event logging in the Magento 2 admin to log actions taken by our employees. One of the reasons we've upgraded to the Enterprise edition is the addition of ...
Merijn's user avatar
  • 152
1 vote
1 answer
989 views

How use Logstash in Magento2 in Docker?

I want to have Docker container with Magento2 shop and container with Logstash. Also I have independent Elasticsearch server. I want to send all logs from Magento with build-in Monolog logger to ...
yehor test's user avatar
5 votes
2 answers
3k views

Magento 2 customer dashboard link show for particular user?

I would like to show the customer dashboard "Pay trade customer link" to particular user (Ex: [email protected]) i have followed this link Add New inbox tab in customer my dashboard in magento 2 for ...
Nagaraju Kasa's user avatar
2 votes
1 answer
11k views

How to log a message when logging turned off in configuration

I am debugging some custom code on the live high traffic Magento 1.9 site. I don't want to turn on logging in System > Configuration > Developer > Log Settings as the log file is filling up ...
Marina's user avatar
  • 23
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
2 votes
1 answer
815 views

Customer login event not working

I want to redirect to home on customer login and i don't want to work this redirection on checkout login here is my code /app/etc/modules/Cusredirection_customer.xml <?xml version="1.0"?> <...
amith lal's user avatar
  • 790
0 votes
1 answer
192 views

Magento : Logging Broken

Debugging an SSL issue, my host technician did something that disabled logging on the site. He doesn't know what he did, and we can't get it working again. I've done the following: disable/enable ...
Joe Palaca's user avatar
3 votes
0 answers
170 views

Catalog Search Refinement issue on admin login

I trying for this past few hours, but i can't find out the issue. I installed the "Catalog Search Refinement" and checked on front end yesterday. Today I'm tried to login on admin panel and i get this ...
Raj Mohan's user avatar
  • 238
0 votes
1 answer
85 views

Logging stopped working after upgrading to Magento CE 1.9

After upgrading Magento CE to version 1.9.2.4, it stopped writing to log_url and log_url_info tables. When I connect directly to mySQL database and make a SELECT query to log_url ordering by ...
piter entity's user avatar
2 votes
1 answer
4k views

Magento 2 writing messages to a log file

How do enable logging in Magento 2, i'm in development mode, i've checked file permissions on all the log files and they all have write access. Magento errors are also visible. Is there anything else ...
Sophie Baxter's user avatar
2 votes
5 answers
6k views

Magento2: How to get guest email address in checkout?

Please, how to get guest email address in checkout?
Samir AFALLAH's user avatar
23 votes
2 answers
47k views

Exception handling in Magento 2

In Magento 1 I was able to catch exceptions and log them into the exception.log file using Mage::logException($e); Now, in Magento 2, I can catch (\Exception $e) but what do I do with the caught ...
Andre Nickatina's user avatar
4 votes
1 answer
1k views

How are pages such as customer account login protected?

I'm looking through controllers, routes, sections, observers... and I can't find the method for protecting a page from non-logged in customers. How is this done officially? I may have found an ...
LM_Fielding's user avatar
  • 1,543
0 votes
1 answer
1k views

main.CRITICAL: Block order_create_billing_form throws exception and cannot be rendered. - Where is this logged?

Can anyone please enlighten me where I can find this exception logged? main.CRITICAL: Block order_create_billing_form throws exception and cannot be rendered. [] [] The context is a custom ...
ProxiBlue's user avatar
  • 9,926
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
1 vote
3 answers
3k views

Logging to a Custom log file or dynamic log time stamp in Magento2

How i can create my own custom log file with time stamp each time when i log the error
Pradeep Kumar's user avatar
1 vote
1 answer
559 views

enable log through config file

Is it possible to enable system/exception logging in Magento through local.xml, instead of doing it by DB saved settings? Or at least via code (but changing the setting only for one particular ...
yivi's user avatar
  • 169
0 votes
1 answer
558 views

Custom logging for notice warnings

I am using magento 1.9.1.0. I had continously trouble with modules which throw notice warnings which in turn broke some functionality. So I've managed to ignore Notice Warnings by putting ...
Nick's user avatar
  • 43
1 vote
2 answers
68 views

System.log and exact URL of page caused that record

My System.log if full of Notices.. 2016-03-11T08:23:39+00:00 ERR (3): Notice: Undefined offset: 0 in /var/../app/code/local/Magerevol/Brands/Block/Prodpage.php on line 29 I know what cause this ...
Alex Pasa's user avatar
0 votes
2 answers
809 views

Mage::Log - Write to a Custom Database table

I have two question regarding Mage::Log. We are working on an application using Magento. We would like to write programming errors to custom database table. Is it possible to do the same using Mage::...
Schrödinger's Cat's user avatar
2 votes
1 answer
381 views

How to determine when custom layout XML is being used

I'm working on a site running Magento CE 1.9.2.2. In the process of applying a new theme and as I'm clicking through the site, I'm running into an anomaly. Every page on the site is using the new, ...
sparecycle's user avatar
  • 1,469
1 vote
1 answer
2k views

Magento 2: How to override default logger?

I want all my log files to be send to a certain server by using this snippet in a custom module use Monolog\Logger; use Monolog\Handler\SyslogUdpHandler; $log = new Logger('Test'); $log->...
xhallix's user avatar
  • 692
2 votes
1 answer
83 views

Magento logged in on random customer

When using my Magento webshop I noticed that sometimes I am logged in on a customers account. How can this be happening?
BasR's user avatar
  • 43
89 votes
17 answers
154k views

How to create custom Log file in Magento 2?

In Magento 1, it was common to segment logs into different files (to separate logs for payment methods, etc.). That's as easy as changing the $file parameter of Mage::log. Magento 2 has changed to ...
Ryan Hoerr's user avatar
  • 12.3k
1 vote
1 answer
934 views

How to track customer login?

I want to track how many times customer logged in. So as output it will be like report. From this to this day X day logged in X times.
test's user avatar
  • 212
1 vote
1 answer
3k views

recently viewed products not showing for guest users

Recently viewed products not showing for guest users. but its working fine for loggedin users. How to show Recently viewed products for guest users? Where to customize the code? I am displaying ...
JageshMk's user avatar
3 votes
1 answer
5k views

What should Mage::throwException do?

I'm sorry if this is a bleedingly obvious question. I think I am going crazy. I have code that I know is stopping at a specific point. The file I am looking at is app/code/core/Mage/Downloadable/...
Sarah's user avatar
  • 860
9 votes
1 answer
2k views

What is the visitors' HTTP User Agent stored in log_visitor_info used for?

I was wondering, where in Magento the visitors' HTTP User Agent Information is used. The log_visitor_info table is pretty big (and for me it seems the user agent information is useless?). I grepped ...
Anna Völkl's user avatar
  • 17.4k
3 votes
1 answer
90 views

Any reasons to keep logging?

You can disable logging in the admin as well as in local.xml so writing to the DB is completely stopped. See this for more info: http://www.axertion.com/tutorials/2012/12/how-to-disable-magento-...
laketuna's user avatar
  • 6,850
1 vote
2 answers
147 views

Can DEBUG level messages be excluded from system.log?

I'm working on a large Magento installation setup by another developer. Logging is disabled in the live environment which struck me as odd. While testing the code with logging enabled locally it ...
STW's user avatar
  • 2,047