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

RE: systemd unit works well but log ging is blob by #639

Open
HenrySqwidbern opened this issue Nov 27, 2018 · 0 comments
Open

RE: systemd unit works well but log ging is blob by #639

HenrySqwidbern opened this issue Nov 27, 2018 · 0 comments

Comments

@HenrySqwidbern
Copy link

HenrySqwidbern commented Nov 27, 2018

All,

I'm using systemd (ubuntu 16.04 LTS, conda py 2.7.15) to control lendingbot.py as a service, that seems to work dandy, loans get made, things seem stable, but I'm having blobby log output in journalctl.
I used the sample unit file snipper over on the readthedocs.io page

=========================================================
hank@thesqwid:~$ sudo systemctl status bfx_lendbot.service
● bfx_lendbot.service - BFX_Lendbot Service
Loaded: loaded (/etc/systemd/system/bfx_lendbot.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2018-11-25 20:43:16 PST; 1 day 2h ago
Main PID: 2392 (python2.7)
CGroup: /system.slice/bfx_lendbot.service
└─2392 /home/hank/miniconda2/envs/bfx_lendbot/bin/python2.7 -u /home/hank/miniconda2/envs/bfx_lendbot/bin/poloniexlendingbot/lendingbot.py

Nov 26 20:42:02 thesqwid python2.7[2392]: [172B blob data]
Nov 26 20:42:32 thesqwid python2.7[2392]: [148B blob data]
Nov 26 20:42:58 thesqwid python2.7[2392]: [172B blob data]
Nov 26 20:43:28 thesqwid python2.7[2392]: [148B blob data]
Nov 26 21:50:16 thesqwid python2.7[2392]: [2.0K blob data]
Nov 26 22:04:31 thesqwid python2.7[2392]: [575B blob data]
Nov 26 22:04:31 thesqwid python2.7[2392]: [91B blob data]
Nov 26 22:05:12 thesqwid python2.7[2392]: [152B blob data]
Nov 26 22:05:12 thesqwid python2.7[2392]: [228B blob data]
Nov 26 23:15:48 thesqwid python2.7[2392]: [2.0K blob data]
hank@thesqwid:~$
=========================================================_

if run manually via console and not via systemd it has sane output.
I tried to mod unit file to include '> some_writeable.log' but systemd spazzed out.
izit becoz i put unit in "/etc/systemd/..." rather than "/lib/systemd/..."? shouldn't matter.
saw the "python -u" for unbuffered output suggested somewhere, no good, same result.
should it be put in a script, maybe with conda env trickery? it doesn't seem like that kinda problem at all.
it would be nice if it could write pretty log output to journalctl so I can control the bot
based on matched strings in that log output.
thank you for any suggestions.

Thanks,
Hank

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

No branches or pull requests

1 participant