cancel
Showing results for 
Search instead for 
Did you mean: 

LOG IN CUSTOMER CHECKOUT

xsalgadog
Participant
0 Kudos
170

Hi guys,

How can I get the log of my plugin?

I have this method:

CLogUtils.addMessageToLog(log, LogItemSeverityCode.Error, "", "You are not allowed to post a receipt!");

but I don't find it, in the log of Customr Checkout.

I have these logs:

I don't know if I need another log.

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

R_Zieschang
Contributor
0 Kudos

Hi xsalgadog,

get the Logger from the LoggerFactory on class level:

private static final Logger LOG = LoggerFactory.getLogger(MainClass.class)

After that you can use the LOG instance where ever you need it. E.g.

LOG.error("I am logging an exception with a parameter...: {}", myVar, e);

HTH

Robert