Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Log file for Dialog.xml

Avatar

Level 4

Dear Team,

We have a custom text component in my AEM websites.

Inside the listener we have customized our link functionality as below.

        /* handle links (add attributes as specified by rules, remove links with invalid */
                                                /* HREFs) */
                                                if (com.isTag(dom, 'a')) {
                                                    var href = com.getAttribute(dom, 'href');
                                                    if (href) {
                                                        if (this.htmlRules.links.validateHref(href)) {
                                                            this.htmlRules.links.applyToObject(dom);
                                                            return false;
                                                        } else {
                                                            this.markForRemoval(dom);
                                                            return true;
                                                        }
                                                    }
                                                }

                                                return false;
                                            };

                                            /* */

How can I see the output in my logfile?

For example I want to see the value of var href = com.getAttribute(dom, 'href'); in my log file.

1 Accepted Solution

Avatar

Correct answer by
Level 10

To do this - you are logging from the AEM JS file.  You can see the output in the browser console by:

console.log('Testing console');

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

To do this - you are logging from the AEM JS file.  You can see the output in the browser console by:

console.log('Testing console');