configure(): an explicit logLevel equal to arLogLevel does not sync a divergent webarkitLogLevel

Aperta
#111 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
api

Direzione di ricerca

Read ARToolKitNFTCore::configure(), getRuntimeSettings(), and WebARKitManager::setLogLevel() to understand how the two log-level globals are updated. Check the existing tests for runtime settings and configuration behavior. First resolve which of the listed options should define the API contract; done means the header documents that behavior and a test covers divergent globals with an explicit level.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

Since the review fixes in #106, ARToolKitNFTCore::configure() writes the log level only when settings.logLevel != -1 and the value differs from the current arLogLevel. That was done so a configure(getRuntimeSettings()) round trip does not overwrite a webarkitLogLevel set separately through WebARKitManager::setLogLevel().

The cost is that an explicit request can be partly ignored. Take arLogLevel = INFO and webarkitLogLevel = WARN, the second set by WebARKitManager. An explicit configure() with logLevel = INFO writes nothing, because INFO equals arLogLevel. WebARKit keeps logging at WARN, and configure() still returns success.

Impact

Low, and none in jsartoolkitNFT: its adapters always set both globals together, so they never diverge. It matters only to a native consumer that mixes WebARKitManager::setLogLevel() with configure().

Options

The two goals pull against each other: honour an explicit request, and keep a round trip from touching anything.

  • Write each global that differs whenever logLevel != -1. A round trip would then sync webarkitLogLevel to arLogLevel. Document that behaviour.
  • Make getRuntimeSettings() report -1 when the two globals differ. A round trip then changes nothing, and an explicit level is applied to both globals.
  • Keep the current behaviour and state the limitation in the configure() header doc.

Whichever is chosen: update the header documentation, and add a test with divergent globals and an explicit level.

Found in the Qodo review of #109 (release 0.12.0). Related to the review fixes in #106.

Lingua principale
C++
Stelle
21
Fork
8
Merge medio
7h 20m
PR unite (30g)
26

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webarkit/WebARKitLib

Tutte le issue di webarkit/WebARKitLib

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.