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 to file option (L switch) is not working #563

Open
SyRenity opened this issue May 28, 2015 · 8 comments
Open

Log to file option (L switch) is not working #563

SyRenity opened this issue May 28, 2015 · 8 comments

Comments

@SyRenity
Copy link
Contributor

The L switch doesn't seem to create a log file on disk, e.g. setting it to:
-L /var/log/telebot.log does nothing, even when launching with root permissions.

Any idea how to enable the disk log files?

@vysheng
Copy link
Owner

vysheng commented May 28, 2015

try to add -d option

@vysheng
Copy link
Owner

vysheng commented May 28, 2015

it's used for daemon mode, so I am afraid that input may break in that case

@SyRenity
Copy link
Contributor Author

I don't use manual input (only LUA scripting) so it's fine.

Tried setting -d, still didn't work. Using latest 1.3.1

@vysheng
Copy link
Owner

vysheng commented May 29, 2015

bin/telegram-cli -vvvv -L tmp -d works for me. Do you have permissions to write to log file? Note, that if you are running under root, telegram-cli will try to setuid to telegramd user. To prevent add -U root option

@SyRenity
Copy link
Contributor Author

Thanks, this sorted it out.

I do get the following error logged now:

[warn] Epoll ADD(1) on fd 0 failed. Old events were 0; read change was 1 (add); write change was 0 (none): Operation not permitted

Any idea what it means?

@SyRenity SyRenity changed the title L switch is not working Log to file option (L switch) is not working May 31, 2015
@vysheng
Copy link
Owner

vysheng commented Jun 1, 2015

it's some error inside libevent. In most cases it isn't something bad

@SyRenity
Copy link
Contributor Author

SyRenity commented Jun 3, 2015

One more question about this - what are the differences between regular and daemon modes, other then lack of console?

@SyRenity
Copy link
Contributor Author

SyRenity commented Jun 7, 2015

@vysheng Also, is there a way to create a PID file (for monitoring by an external watchdog)?

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

2 participants