Questions tagged [logging]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
216 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\...
0 votes
1 answer
56 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:...
  • 68
0 votes
2 answers
329 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($...
  • 1,712
0 votes
1 answer
19 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.
  • 47
1 vote
1 answer
38 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, ...
0 votes
1 answer
187 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:- ...
0 votes
1 answer
36 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\...
  • 105
0 votes
1 answer
240 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 ...
3 votes
1 answer
167 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 ...
  • 175
4 votes
1 answer
51 views

How to reduce logging on my live site?

In Magento 2, can I reduce the logging for my production site?
  • 43
0 votes
1 answer
57 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 ...
  • 809
5 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....
  • 2,809
0 votes
2 answers
24 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 ...
  • 2,551
2 votes
5 answers
1k 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) { ...
0 votes
1 answer
926 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?
-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\...
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 ...
  • 1,117
0 votes
1 answer
578 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"}}
  • 1,242
1 vote
1 answer
1k 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 ...
  • 152
1 vote
1 answer
865 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 ...
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: example@gmail.com) i have followed this link Add New inbox tab in customer my dashboard in magento 2 for ...
2 votes
1 answer
9k 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 ...
  • 23
2 votes
1 answer
2k 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 ...
2 votes
1 answer
806 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"?> <...
  • 694
0 votes
1 answer
183 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 ...
3 votes
0 answers
166 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 ...
  • 238
0 votes
1 answer
80 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 ...
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 ...
2 votes
5 answers
5k views

Magento2: How to get guest email address in checkout?

Please, how to get guest email address in checkout?
22 votes
2 answers
39k 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 ...
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 ...
  • 1,523
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 ...
  • 9,806
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
1 vote
1 answer
548 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 ...
  • 169
0 votes
1 answer
534 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 ...
  • 43
1 vote
2 answers
65 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 ...
0 votes
2 answers
783 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::...
  • 368
2 votes
1 answer
369 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, ...
  • 1,459
1 vote
1 answer
1k 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->...
  • 682
2 votes
1 answer
74 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?
  • 43
83 votes
16 answers
108k 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 ...
1 vote
1 answer
879 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.
  • 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 ...
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/...
  • 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 ...
  • 17.2k
3 votes
1 answer
87 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-...
  • 6,810
1 vote
2 answers
144 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 ...
  • 2,047
6 votes
2 answers
7k views

log_url table and cleaning

I have a log_url table that is close to a million rows. I have run log cleaning but it doesn't seem to put a dent into it (confirmed that the cron is running). After some investigation, I see that ...
  • 2,695
0 votes
1 answer
152 views

Magento system log filling up with CSS and JS debug messages

My Magento log is filling up with inlcusions of JS and CSS files (400 mb in couple of days) - what can this be? I don't recall putting in any debug statements ... Quite annoying Where to start ...
  • 5,332
0 votes
1 answer
374 views

php-fpm workaround and Undefined index notices

In implementing the php-fpm fix/workaround as detailed at: http://www.magentocommerce.com/boards/v/viewthread/229253/#t383462 It results in "Undefined index: content-type" entries in the system.log ...