View Issue Details

IDProjectCategoryView StatusLast Update
0004065Talerwallet (WebExtension)public2019-12-26 21:37
ReporterChristian Grothoff Assigned ToMarcello Stanisci  
PrioritynormalSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Version0.0 
Target Version0.0Fixed in Version0.0 
Summary0004065: logging in the 'main' window
DescriptionRight now, some wallet operations 'log' by writing into the main DOM (i.e. if I 'cancel' the withdraw operation on the bank demo site). Instead, logging should go to the JavaScript console (i.e. via console.log()), where it is hidden from normal users.

This mostly means that we need to call
GNUNET_logger_add() during initialization and pass a callback that will call the console.log() function.

Note that this ONLY works with *GNUnet* SVN >= 36685, as only after that version a custom logger disables the default logger.
TagsNo tags attached.

Activities

Marcello Stanisci

2015-12-01 14:48

reporter   ~0009965

Removing the log responding to 'cancel' press.

By using GNUNET_logger_add, we would call console.log() through
GNUNET_log, but this last function must be firstly imported with a
dedicated name into JavaScript.

So the whole thing ends in: imported_GNUNET_log calls GNUNET_log, which
in turn calls console.log(). So we anyway introduce a new (function's) name
for logging. At this point, it may be shorter to put a wrap around console.log()
without calling in cause emscripted routines.

In this case, there is already such a wrap called 'tDebug()' in wallet_button/firefox_src/content/lib/prettyPrint.jsm

Christian Grothoff

2015-12-01 15:46

manager   ~0009969

Agreed, nothing wrong with also adding your own 'short' log function.

However, you do still need to override the GNUNET_log function as the C code will still use the C logging mechanism.

Marcello Stanisci

2015-12-10 11:02

reporter   ~0009990

A misunderstanding in terminology may have happened here.

The logs you saw in the main DOM were intentional, not caused by any 'printf'
in C land. Actually, any 'printf' called in C land gets written in the console
by default. So this may not be an issue. Close it?

Christian Grothoff

2015-12-10 11:07

manager   ~0009991

Ah, sure. I didn't check where those logs I saw were generated ;-).

Issue History

Date Modified Username Field Change
2015-11-23 09:47 Christian Grothoff New Issue
2015-11-23 09:47 Christian Grothoff Status new => assigned
2015-11-23 09:47 Christian Grothoff Assigned To => Marcello Stanisci
2015-12-01 14:48 Marcello Stanisci Note Added: 0009965
2015-12-01 15:46 Christian Grothoff Note Added: 0009969
2015-12-10 11:02 Marcello Stanisci Note Added: 0009990
2015-12-10 11:03 Marcello Stanisci Status assigned => feedback
2015-12-10 11:07 Christian Grothoff Note Added: 0009991
2015-12-10 11:07 Christian Grothoff Status feedback => assigned
2015-12-10 11:07 Christian Grothoff Status assigned => resolved
2015-12-10 11:07 Christian Grothoff Fixed in Version => 0.0
2015-12-10 11:07 Christian Grothoff Resolution open => fixed
2015-12-10 11:08 Christian Grothoff Status resolved => closed
2019-12-26 21:37 Florian Dold Category wallet (browser-based) => wallet (WebExtensions)
2023-04-13 20:37 Florian Dold Category wallet (WebExtensions) => wallet (WebExtension)