Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log.message() doesn't work #66

Closed
justrhysism opened this issue Mar 4, 2014 · 8 comments
Closed

log.message() doesn't work #66

justrhysism opened this issue Mar 4, 2014 · 8 comments
Assignees

Comments

@justrhysism
Copy link

(at least on Windows anyhow)

Whenever I try to use log.message(), in any form, the test either stalls when it reaches that instruction, or the test "ends" immediately displaying the current number of assertions, but without exiting the process (I need to Ctrl+Break to exit it), or it's simply skipped without outputting any messages at all.

I haven't been able to get any of the log features working at all (message() and dom()).

@asciidisco asciidisco added the bug label Mar 7, 2014
@asciidisco
Copy link
Member

Mhh,
I have no issues regarding log.dom or log.message on my mac.

Could you give me some more information about your HTML & your test, as well as which browser you are using for your tests, your dalek, node & OS version?

That would help me a lot debugging this issue.

@martinkr
Copy link

same for me:
OSX: 10.7.5
grunt-cli v0.1.13
grunt v0.4.4
DalekJS CLI Tools Version: 0.0.4
DalekJS local install: 0.0.8
node: v0.8.22

@mdix
Copy link
Contributor

mdix commented Mar 20, 2014

Hi @asciidisco,

I have the same problem (log.message is simply ignored). I'll setup a testcase and check why it is not working as expected.

OSX: 10.9.2
node: 0.10.26
dalekjs: 0.0.8
dalek-browser-chrome: 0.0.8

Best
Marc

@mdix
Copy link
Contributor

mdix commented Mar 20, 2014

Hi @asciidisco,

seems that outputLogUser in levelbase.js (console reporter) is empty, thus nothing is written to the stdout in the first 4 log levels (0 to 3). The method is overridden in log levels 4 + 5, thus the logging works fine there.

Check this gist: https://gist.github.com/mdix/9666199

@asciidisco: If you can confirm that this is the root cause, I'll add a PQ that fixes the problem (I suppose just moving the method definition to loglevel 1 should be sufficient).

Best
Marc

Edit:
base definition
https://github.com/dalekjs/dalek-reporter-console/blob/master/lib/levelbase.js#L254

nutting in level1
https://github.com/dalekjs/dalek-reporter-console/blob/master/lib/loglevel/level1.js

level4
https://github.com/dalekjs/dalek-reporter-console/blob/master/lib/loglevel/level4.js#L51

@ryanzec
Copy link
Contributor

ryanzec commented Mar 20, 2014

@mdix I don't think there is an issue with outputLogUser as I believe that particular output is designed to only output at level 4 or higher (@asciidisco would be able to definitively confirm that).

@asciidisco
Copy link
Member

Fixed with mdix/dalek-reporter-console@2065c43

Will test & close if it works.

@cupito
Copy link

cupito commented Jun 30, 2014

Does this also mean, that the log messages will be forwarded to all reporter?
so that, e.g. it can be read in the html output?

@asciidisco
Copy link
Member

You can build a reporter that receives the log messages & also outputs/saves them in any form. What you see in the console is also technically just a reporter. But as of now, the HTML reporter for example doesn't store the messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants