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

[Feature]: Allow wig logs to be ported on a file instead on console #78

Open
westor7 opened this issue Jul 31, 2020 · 6 comments
Open

Comments

@westor7
Copy link

westor7 commented Jul 31, 2020

Hello,

It would be nice to have an option under config to be able to place any wig log on a file.

Example:

# Log all outputs on a file
logFile = "/var/log/webircgateway.log"
  • Thanks!
@westor7
Copy link
Author

westor7 commented Jul 31, 2020

It's available via "./webircgateway > /var/log/webircgateway.log"

@westor7 westor7 closed this as completed Jul 31, 2020
@know75
Copy link

know75 commented Aug 1, 2020

I've actually been trying to fix this issue for months myself. I've tried this solution and many others over and over long before reading this today and thought it was just me.

For me starting WIG as suggested above, the logs still appear in the console and while a log file is created, it's always empty:

-rw-r--r-- 1 root root 0 Jul 31 23:36 webircgateway.log

Debian 9/WIG (about 3 months old). It was installed via git clone, GO. WIG works perfectly, but the lack of logs is a problem I can't seem to fix.

Any suggestions would be really welcome. Thank you.

@prawnsalad
Copy link
Member

@know75 this is how it's done in the official installer packages to create the /var/log/* files too. I'm not sure why your shell would be acting differently.

@know75
Copy link

know75 commented Aug 2, 2020

Thank you so much for your reply @prawnsalad.

It really does seem to be something on my end. I've tried a 100 Google searches to try and log to a file from the console. They all pretty much lead to @westor7's solution (which I use often for other applications), and you're doing in the offical packages. Maybe I messed something in the Go path, but WIG works perfectly. Anyway, thanks for taking the time to respond.

@westor7
Copy link
Author

westor7 commented Aug 25, 2020

Actually it seems @know75 here is right. (using Ubuntu 20.04)

I tried to use ./webircgateway > /var/log/webircgateway.log too but it doesn't write anything on the log file in realtime, everything is output on console, even if i kill the webircgateway it doesn't write anything there either.

I still recommend for a better handle configurable addition about this, like:

# Log all outputs on a file
logFile = "/var/log/webircgateway.log"

@westor7 westor7 reopened this Aug 25, 2020
@know75
Copy link

know75 commented Aug 26, 2020

@westor7, If you find an answer, please let me know.

If would most definitely be more elegant to have a file for logging to be specified within the config file.

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

3 participants