Skip to content

Hacking

Inho Oh edited this page Apr 16, 2020 · 11 revisions

Environment variables

  • NUGU_LOG: stderr, stdout, syslog and none
  • NUGU_LOG_MODULE: all or comma(',') separated list of strings(default, network, network_trace, protocol)
  • NUGU_LOG_LEVEL: debug, info, warning or error
  • NUGU_OAUTH2_URL: default https://api.sktnugu.com/
  • NUGU_REGISTRY_SERVER: default https://reg-http.sktnugu.com
  • NUGU_USERAGENT: default OpenSDK/1.0.0 (Linux) Client/${VERSION}
  • NUGU_NETWORK_USE_EVENTS: use /v1/events (default 0)

AddressSanitizer

Reference: https://github.com/google/sanitizers/wiki/AddressSanitizer

export ASAN_OPTIONS=verbosity=1:detect_leaks=1:fast_unwind_on_malloc=0
export LSAN_OPTIONS=verbosity=1:log_threads=1:report_objects=1

Guide to capture protocol logs

If protocol is included in the log module, protocol related logs are output to stderr.

export NUGU_LOG_MODULE=protocol
nugu_sample -d -m /var/lib/nugu/model 2>log.txt

Now perform the desired action in the sample app and exit. Then you can check the saved log through cat command.

cat log.txt

Examples: Protocol Logs