anon icon indicating copy to clipboard operation
anon copied to clipboard

Logs ?

Open DannyCork opened this issue 10 years ago • 7 comments

How can I verify anon is working ?

Imagine anon is running in a country where anonymous edits are few and far between. Anon is running but how do I know it's actually working? I don't see log files, perhaps we should add a log file?

I can see a node process that is spawned. What happens when this process dies, no logs right ?

Maybe there are logs that I'm not seeing ?

Thanks.

DannyCork avatar Jul 17 '14 22:07 DannyCork

From the README:

If you would like to see all the change activity (URLs for each change) to test that it is actually listening use the --verbose flag:

./anon.coffee --verbose

ineffyble avatar Jul 18 '14 07:07 ineffyble

Better logging would be a good thing, I'll leave this open till we have it.

edsu avatar Jul 18 '14 10:07 edsu

I start as follows ./anon.coffee &

however the process dies after x hours. I have no logs to read , hence no idea why it died. Logs would be great. Thanks.

DannyCork avatar Jul 20 '14 12:07 DannyCork

How does it die? Are you running on a laptop that goes to sleep? Did you try the --verbose flag?

edsu avatar Jul 20 '14 15:07 edsu

Temp solution for linux: the most used supervisor for logging&keeping up nodesjs apps for you is "supervisord". It's autonomic. It manage start, stop and autonomous restart if nodejs app crash.

remagio avatar Jul 30 '14 12:07 remagio

I am now attempting to get some logs to investigate by doing a nohip ./anon.coffee > log &

Remagio thanks must look into this.

DannyCork avatar Jul 30 '14 12:07 DannyCork

@DannyCork once supervisors is deployed you can:

  • set rights on anon deploy with a non-root-user: "chown -R user-run-anon:group-user-anon /yourpath-anon"
  • create at "/etc/supervisor/conf.d" the "anon.conf" with:
    [program:anon]  
    command = /yourpath-anon/anon.coffee --verbose  
    directory = /yourpath-anon/  
    user = user-run-anon  
    autostart = true  
    autorestart = true  
    stdout_logfile = /var/log/supervisor/anon.log  
    stderr_logfile = /var/log/supervisor/anon_err.log
  • start supervisor with: "service supervisor start"
  • now it will start at every boot and restart it when crash

remagio avatar Jul 30 '14 23:07 remagio