Code Monkey home page Code Monkey logo

Comments (4)

MonteShaffer avatar MonteShaffer commented on May 28, 2024

whereis highcharts-export-server

~/.nvm/versions/node/v6.9.4/bin/highcharts-export-server

The full path works for www-data ... I guess "global" doesn't set global envirnoment variables.

STILL NOT LOGGING! ...

~/.nvm/versions/node/v6.9.4/bin/highcharts-export-server --logLevel 4 --logDest '/path/to/CLI/highcharts.log' --width 1200 --type 'png' --constr 'Chart' --instr '{"internal-key":"freeHighChart","credits":{"enabled":false},"chart":{"type":"bubble","plotBorderWidth":1,"zoomType":"xy","resetZoomButton":{"theme":{"display":"none"},"position":{"align":"left","verticalAlign":"bottom","x":-50,"y":25},"relativeTo":"plot"}},"plotOptions":{"bubble":{"minSize":25,"maxSize":50},"series":{"allowPointSelect":true,"dataLabels":{"format":"{point.name}","enabled":true},"marker":{"states":{"select":{"fillColor":"red","lineWidth":0}}},"point":{"events":{"click":"function(e){ var obj = e.point; doZoom(subsetHighChart, obj.x-1, obj.x+1, obj.y-1, obj.y+1, obj.index, obj.name, obj.nonstopstem.ideafreq);}","select":"function(e){ doZoom(subsetHighChart, e.target.x-1, e.target.x+1, e.target.y-1, e.target.y+1, e.target.index, e.target.name, e.target.nonstopstem.ideafreq); $(\"#idea-tab-free-highchart-search-box\").combobox(\"setText\",e.name); }"}}}},"title":{"text":""},"subtitle":{"text":""},"xAxis":{"min":0,"max":100,"startOnTick":false,"endOnTick":false,"gridLineWidth":1,"maxPadding":0.2,"title":{"text":"Commonality (Percentile) based on document occurrencee"},"labels":{"format":""}},"yAxis":{"min":0,"max":100,"startOnTick":false,"endOnTick":false,"gridLineWidth":1,"maxPadding":0.2,"title":{"text":"Commonality (Percentile) based on total occurrence"},"labels":{"format":""}},"tooltip":{"useHTML":true,"followPointer":true,"headerFormat":"<table border=0 cellpadding=5 cellspacing=0>","pointFormat":"<tr><th colspan=\"2\" align=\"center\"><h3 style=\"margin: 0; padding: 2;\">{point.title}<\/h3><\/th><\/tr><tr><th colspan=\"2\" align=\"center\" style=\"font-size: 50%;\">{point.variants}<\/th><\/tr><tr><th title=\"Based on How Many Documents This Appeared In\">Commonality (Document Occurrence):<\/th><td align=\"center\">{point.nonstopstem.docquantile} %ile<\/td><\/tr><tr><th title=\"Based on How Many Times This Appeared In All Documents\">Commonality (Total Occurrence):<\/th><td align=\"center\">{point.nonstopstem.totalquantile} %ile<\/td><\/tr><tr><th>Within-Idea Occurrence:<\/th><td align=\"center\">{point.nonstopstem.ideafreq} times<\/td><\/tr>","footerFormat":"<\/table>"},"series":[{"name":"words in idea (1-grams)","data":[{"x":25,"y":35,"z":24,"name":"w-3...","title":"word-3","variants":"[word-3, word-3a]","nonstopstem":{"docquantile":25,"totalquantile":35,"ideafreq":24}}]}],"colors":["#7cb5ec","#f15c80","#B789B6","#7cb5ec","#f15c80","#B789B6","#7cb5ec","#f15c80","#B789B6","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"legend":{"enabled":true},"exporting":{"buttons":{"contextButton":{"align":"left","x":80,"y":0}}}}' --outfile '/path/to/CLI/test.png' 2>&1

from node-export-server.

cvasseng avatar cvasseng commented on May 28, 2024

Hi, as you said, npm install -g only adds links for the user running the command.

For this particular use case, I'd recommend you clone the repository and run node bin/cli.js instead of running hichcharts-export-server from the .nvm folder, which could have side effects in the form of permission errors when not running it as the user who did the npm install.

For the logging: I'm assuming what you have issues with is the file logging? Does the user you're running it as have write permissions to the path you're supplying to --logDest?

from node-export-server.

MonteShaffer avatar MonteShaffer commented on May 28, 2024

I currently have it working via the full "bin" path for user "www-data" with my -g install. I will revert to node bin/cli.js if need be, but currently, it appears to be working as expected.

The logging is just strange... apparently logDest is a folder, not a file... and in that folder, it creates another folder "logs" and places a file [with mispelling] higcharts-export-server.log in the new folder. This is probably why I am getting my "write permissions" all messed up. I created the folder, and even touched a file for the log, and I want highchartst to log to the specified full path-log file, and the system is doing its own arbitrary thing.

In addition, even though I specify logLevel 4, which includes verbose, this logging does not include [verbose] messages that appear on the CLI.

from node-export-server.

cvasseng avatar cvasseng commented on May 28, 2024

Gotcha.

-logDest is a path as you say, and should not include the filename.

There was a race condition for output - it tried outputting log lines before the log file had been created, and the path had been verified. This is what caused the verbose output to disappear, as they were all coincidentally outputted before the file was ready. Fixed in 485564d.

The filename can be set separately using the -logFile option (added in 485564d, defaults to highcharts-export-server.log).

Changes have also been pushed to NPM (version 1.0.5).

Feel free to re-open this if you experience further issues with logging.

from node-export-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.