Questions tagged [logging]
The logging tag has no usage guidance.
58
questions
0
votes
2
answers
46
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 $...
1
vote
1
answer
531
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
190
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:...
0
votes
2
answers
417
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($...
0
votes
1
answer
28
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.
1
vote
1
answer
123
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
399
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
42
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\...
0
votes
1
answer
318
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
210
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 ...
4
votes
1
answer
74
views
How to reduce logging on my live site?
In Magento 2, can I reduce the logging for my production site?
0
votes
1
answer
152
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 ...
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....
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 ...
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) {
...
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?
-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 ...
0
votes
1
answer
656
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
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 ...
1
vote
1
answer
959
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: [email protected]) i have followed this link Add New inbox tab in customer my dashboard in magento 2 for ...
2
votes
1
answer
10k
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 ...
2
votes
2
answers
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
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"?>
<...
0
votes
1
answer
187
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
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 ...
0
votes
1
answer
81
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
6k
views
Magento2: How to get guest email address in checkout?
Please, how to get guest email address in checkout?
23
votes
2
answers
45k
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 ...
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 ...
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
553
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 ...
0
votes
1
answer
552
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 ...
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 ...
0
votes
2
answers
805
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::...
2
votes
1
answer
379
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
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->...
2
votes
1
answer
81
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?
87
votes
16
answers
142k
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
920
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.
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/...
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 ...
3
votes
1
answer
89
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-...
1
vote
2
answers
145
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 ...
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 ...
0
votes
1
answer
153
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 ...