Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Can we log from Sightly / HTL?

Avatar

Avatar
Validate 1
Employee
lklement
Employee

Likes

2 likes

Total Posts

8 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Give Back 3
Give Back
Ignite 1
Boost 1
View profile

Avatar
Validate 1
Employee
lklement
Employee

Likes

2 likes

Total Posts

8 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Give Back 3
Give Back
Ignite 1
Boost 1
View profile
lklement
Employee

21-01-2017

Looking at the list of HTL Global Objects in the documentation log is listed as a java-backed object backed by org.slf4j.Logger.

My question is, how can I use it?

I can't find any examples of it.

Thinking about it, this is a specific case of a more general question; How can I call methods and pass parameters to Java-backed objects?

I know it can be done when instantiating a Use-API object but that's not the pattern I'm after.

If it can't be done then it is hard to understand why the log and out objects are made available.

View Entire Topic

Avatar

Avatar
Ignite 1
Level 2
Rajashankar
Level 2

Likes

5 likes

Total Posts

22 posts

Correct Reply

2 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 3
Give Back
Boost 5
View profile

Avatar
Ignite 1
Level 2
Rajashankar
Level 2

Likes

5 likes

Total Posts

22 posts

Correct Reply

2 solutions
Top badges earned
Ignite 1
Validate 1
Give Back 3
Give Back
Boost 5
View profile
Rajashankar
Level 2

25-08-2017

Adding to the Visser Statement

In Javascript which we call via sightly script add logs like

use(function() { log.error(“Log from Sightly JS Code");}

In Java Code

private final Logger log = LoggerFactory.getLogger(MyCustomClass.class);

private void mymethod(){

log.info("Event Path===>{}",evnt.getPath());

}