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

Either remove or expose logxi #36

Open
sbowman opened this issue Feb 27, 2016 · 2 comments
Open

Either remove or expose logxi #36

sbowman opened this issue Feb 27, 2016 · 2 comments

Comments

@sbowman
Copy link

sbowman commented Feb 27, 2016

Right now logxi is embedded inside dat and is not accessible or configurable, except through the command line. For applications that use alternate logging libraries or aren't 12-factor apps, this makes using dat problematic and often cumbersome. For example, I am apparently supposed to be able to redirect STDOUT to a log file if needs be, but nothing gets written when I do that. I fear if I can get it to work, the file will then fill with ANSI escape characters, making the log file unreadable. Furthermore, we would like to configure logging ourselves and use remote syslog, but this is impossible with dat, as logxi does not support this.

It would be far better if dat simply returned error messages, instead of performing its own logging.

@mgutz
Copy link
Owner

mgutz commented Mar 1, 2016

logxi, when redirected, will set the log level to ERROR and above. To see all levels

LOGXI=* go run your-app.go > log.txt

Logxi logs structured JSON without escape sequences when redirected.

@itimofeev
Copy link

There's even PR for setter/getter logxi #47
Any problems with it?

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