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

Logfile in case of systemd service #30

Closed
zmata opened this issue Mar 28, 2018 · 3 comments
Closed

Logfile in case of systemd service #30

zmata opened this issue Mar 28, 2018 · 3 comments

Comments

@zmata
Copy link

zmata commented Mar 28, 2018

Hi, what is logfile in case of MBUSD systemd service?
Is it posible to specify it in conf file?
Thanks

@sgel83
Copy link

sgel83 commented Apr 4, 2018

By default:

/var/log/mbus.log

This is staticly defined in the log.h file.

mbusd/src/log.h

Lines 42 to 43 in 8f2ccf1

#define LOGPATH "/var/log/"
#define LOGNAME "mbus.log"

Currently its not possible to set it in the configuration file.

@sgel83
Copy link

sgel83 commented Apr 4, 2018

What you can do though is change the ExecStart= line in the systemd

ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/mbusd -d -v2 -L - -c @CMAKE_INSTALL_FULL_SYSCONFDIR@/mbusd/mbusd-%i.conf -p /dev/%i

ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/mbusd -d -v2 -L - -c @CMAKE_INSTALL_FULL_SYSCONFDIR@/mbusd/mbusd-%i.conf -p /dev/%i

change the -L - to the directory and file that you would like the log file to be:

E.g.

ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/mbusd -d -v2 -L /var/log/mbusd/mbusd.log -c @CMAKE_INSTALL_FULL_SYSCONFDIR@/mbusd/mbusd-%i.conf -p /dev/%i

@zmata
Copy link
Author

zmata commented Apr 4, 2018

Hi, I've already changed -L - to -L /var/log/mbusd/%i before creating my deb package.
Thanks

@zmata zmata closed this as completed Apr 4, 2018
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