Skip to content

Error formating numbers #21

Open
Open
@Toub

Description

@Toub

Looks like the numbers formatter always fails when using decimals.
It should never fail, even if the decimal is not provided.

   $log.getInstance('main').info('===> This works: "%s"', "string text");
   $log.getInstance('main').info('===> This fails: "%d"', 10);

Stack trace:

"June 19, 2016 3:44 PM::[main]> " "Error: [sprintf] expecting number but found undefined
[4]</</sprintf.format@http://localhost:3000/bower_components/angular-logger/dist/angular-logger.js:3893:1
sprintf@http://localhost:3000/bower_components/angular-logger/dist/angular-logger.js:3860:16
[2]</</LoggingEnhancer/self.countSprintfHolders@http://localhost:3000/bower_components/angular-logger/dist/angular-logger.js:215:1
maybeApplySprintf@http://localhost:3000/bower_components/angular-logger/dist/angular-logger.js:158:31
enhanceLogline@http://localhost:3000/bower_components/angular-logger/dist/angular-logger.js:149:25
[2]</</LoggingEnhancer/this.enhanceLogging/<@http://localhost:3000/bower_components/angular-logger/dist/angular-logger.js:122:30
[...]
" "===> This fails: "%d"" 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions