ExploreConsulting / netsuite-fasttrack-toolkit-ss2

NFT for SuiteScript 2.X
75 stars 20 forks source link

How to enable logging on LazySearch? #85

Closed steveklett closed 11 months ago

steveklett commented 11 months ago

I'm trying to debug a strange issue with LazySearch and I see there are some logging calls, but I don't see those logs in my scripts execution logs. I'm sure I'm missing an important concept with the logging setup because I don't understand why I'd not see those logs. I'm posting this as a question because I see there is an available questiontag :)

ShawnTalbert commented 11 months ago

The logger name is 'lazy' as shown here https://github.com/ExploreConsulting/netsuite-fasttrack-toolkit-ss2/blob/77764aeb32f2510413ca47006263344edf57e63f/search.ts#L101

By default the logging level is none. You can change that by calling something like LogManager.getLogger(LazySearch.LOGNAME).setLevel(LogManager.loglevel.debug)

steveklett commented 11 months ago

Hi Shawn! I appreciate the response and it worked perfect. I was missing the concept of the log level. I plan to add an example and blurb on the project documentation.

ShawnTalbert commented 11 months ago

jolly good, will check out the other issue as well.