vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
575 stars 102 forks source link

how to see settings of manet instance #25

Closed jfix closed 9 years ago

jfix commented 9 years ago

When I have manet running, is there a way to see what the different configuration options are that are being used (in the sandbox maybe)? I'm thinking of the rasterisation engine (slimerjs or phantomjs), the compression, which config JSON file being used etc.

Or an additional option that shows them without starting manet, --debug or --verbose ... just making this up.

I'm asking because even though I'm currently running 0.3.4 my screenshots are seemingly uncompressed (Google homepage at 3MB instead of 21KB), and I'd like to look into this more before filing a bug. Also, the --compress true doesn't seem to have any effect anymore.

Where is the JSON file located that's being used? And can I use another one located elsewhere that overloads the default values?

Thanks!

vbauer commented 9 years ago

Now this configuration information will be printed in console at the startup (with "debug" logging level). To switch logging level: --level=debug

I suggest you to update Manet to the last version (0.3.5). I've just fixed some bugs that could solve your problems. I've found that some fixes work fine on Windows and do not work on Linux systems (and otherwise).

For Ubuntu OS + NPM, config file is located here: /usr/local/lib/node_modules/manet/src/config/default.json

At the current moment you can't use other configuration file, but you can specify parameters using CLI.

vbauer commented 9 years ago

@jfix Did it help you and we can close this ticket or not?

jfix commented 9 years ago

Hi @vbauer I haven't had time to test this (is the debug level still the default for logging?); I will try tonight. Sorry (and thanks)!

vbauer commented 9 years ago

No it isn't, but you can activate it using CLI parameter --level=debug (or change configuration file)

jfix commented 9 years ago

Hi @vbauer I just had a look, this is what I see (slightly redacted):

$ manet --level=debug
info: Initialize FS watchdog: directory: /tmp, timeout: 3600000
debug: Configuration parameters: %j port=8891, cors=false, ui=true, silent=false, level=debug, engine=phantomjs, , timeout=60000, compress=false, cache=3600, cleanup=false, linux=xvfb-run -a slimerjs, freebsd=xvfb-run -a slimerjs, sunos=xvfb-run -a slimerjs, darwin=slimerjs, win32=slimerjs.bat, linux=phantomjs, freebsd=phantomjs, sunos=phantomjs, darwin=phantomjs, win32=phantomjs, whitelist=[.*], TERM=xterm, SHELL=/bin/bash, SSH_CLIENT=[ip.address] 22, SSH_TTY=/dev/pts/0, LC_ALL=en_GB.UTF-8, USER=[username], LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:, MAIL=/var/mail/[username], PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games, PWD=/home/[username], LANG=en_GB.UTF8, SHLVL=1, HOME=/home/[username], LOGNAME=[username], SSH_CONNECTION=[ip.address] 22, LC_CTYPE=UTF-8, LESSOPEN=| /usr/bin/lesspipe %s, LESSCLOSE=/usr/bin/lesspipe %s %s, _=[], $0=/usr/local/bin/manet, storage=/tmp
info: Manet server started on port 8891

This looks generally very rich (I'm mostly interested in the first couple of lines, the file name extensions don't make sense to me, but may be useful to someone else), so thanks for exposing this configuration inofrmation. Is the %j some unresolved place holder name? Between engine=phantomjs and timeout=60000 it seems like there is a superfluous comma. And finally, would it be possible to also show the location of the default.json in this output?

Thanks.

vbauer commented 9 years ago

Fixed, thank you for feedback!