how to debug or log info in bean | Community
Skip to main content
Xena_bcn
Level 5
October 16, 2015
Solved

how to debug or log info in bean

  • October 16, 2015
  • 34 replies
  • 7521 views

hello here.

So one of my component java bean functions is not returning result I am expecting.

I added log.info  to trace , doesn't print anything.

 

Then used debug from Eclipse , doesn't stop on breakpoints.

 

Where and what I should do?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by edubey

Try this snippet of code.

Resource r = resourceResolver.getResource(path); Asset a = r.adaptTo(Asset.class); Rendition rnd = a.getOriginal(); long size = rnd.getSize();

34 replies

Xena_bcn
Xena_bcnAuthor
Level 5
October 16, 2015

Hi,

It is one of components Java bean class.

I access to the web page via WCM in localhost:4502 and I see the component, but the file size is shown as 0.00kb

ButI don't see any log.

I've  used System.out.println("") too.

Adobe Employee
October 16, 2015

Hi,

unless I have missed it, you haven't explained how you are expecting your code to be called? Is it called by a JSP, is it called by another Java OSGI Service?

Regards,

Opkar

Xena_bcn
Xena_bcnAuthor
Level 5
October 16, 2015

all logs in author\crx-quickstart\logs folder

Xena_bcn
Xena_bcnAuthor
Level 5
October 16, 2015

hellooo

before the calling the private method it is printing it

 

why?