View Issue Details

IDProjectCategoryView StatusLast Update
0004065Talerwallet (WebExtension)public2019-12-26 20:37
ReporterChristian Grothoff Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
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.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Marcello Stanisci

2015-12-01 13: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 14: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 10: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 10:07

manager   ~0009991

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

Issue History

Date ModifiedUsernameFieldChange
2015-11-23 08:47Christian GrothoffNew Issue
2015-11-23 08:47Christian GrothoffStatusnew => assigned
2015-11-23 08:47Christian GrothoffAssigned To => Marcello Stanisci
2015-12-01 13:48Marcello StanisciNote Added: 0009965
2015-12-01 14:46Christian GrothoffNote Added: 0009969
2015-12-10 10:02Marcello StanisciNote Added: 0009990
2015-12-10 10:03Marcello StanisciStatusassigned => feedback
2015-12-10 10:07Christian GrothoffNote Added: 0009991
2015-12-10 10:07Christian GrothoffStatusfeedback => assigned
2015-12-10 10:07Christian GrothoffStatusassigned => informing
2015-12-10 10:07Christian GrothoffFixed in Version => 0.0
2015-12-10 10:07Christian GrothoffResolutionopen => fixed
2015-12-10 10:08Christian GrothoffStatusinforming => closed
2019-12-26 20:37Florian DoldCategorywallet (browser-based) => wallet (WebExtensions)
2023-04-13 18:37Florian DoldCategorywallet (WebExtensions) => wallet (WebExtension)