-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
rundown of log component by sineemore #162
Comments
Currently with every invocation of console application the folder |
yea. I don't like it either |
let's start with turning off writing log files by default |
this is indeed mostly about torchbear-scripts/log (good name?), ie jazzdotdev/log#5
that log project is part of torchbear-libs, so it's meant to be used by default. for example, gut imports it and lighttouch imports it too.
I need to document this.
this is only the Rust environment log from the log crate. its bindings are there, but now they're prefixed with underscore, ie idk what to do with it so well. if it were up to me, there'd be what else do you think we should do with Rust's log module? (btw, it's not that good, and idk what's going on with "structured logging" effort, or whatnot) best thing going so far sorta at this level is that we're catching panics and making it easier to make sending the log to us better. see component/panic tag I guess for the init system you want that scripted. I haven't studied init systems patterns much, so I don't get why this would be good at any level. please explain further what you have in mind
rust-syslog is built on top of the log crate, so I doubt it'd be worth it to use much. I'd rather build a new system on top of torchbear's functionality |
Also see this article, that describes runit approach at logging. |
you didn't say which log engine to target. I assume both we need an issue here with it seems like you might be getting sidetracked from logging and talking about init systems. so does systemfd address anything you have in mind? that's another topic too that we need to discuss really looking for plans at this point |
Nope, we shouldn't target any of those. One more issue I can think off is undesired colored logs in standard output: by default logs in terminal are colored, we can toggle color support with enviroment variable NO_COLOR. But when I redirect torchbear command to a file (or a subprocess like in pipeline above) the colored logs will make it trough and reside in file. You can test it with simple init.lua, which will raise a colored error:
Run it like this: The out.log will contain the escape sequences. I guess it is wrong behaviour. |
ok, pointing it is good, but making an issue for it is better structured text > unstructured text |
Currently logs are initialized in src/lib.rs by Rust part before any Lua code is started. This approach is useful for daemons, but not flexible for interpreter applications.
A bit of background: in my last project I've created a light C init system with supervisor (similar to runit). All daemons started by the init system where configured to print logs to stdout. The init system collected the logs via a custom logger in a fashion of
sshd -e ... | logger -rotate 5m /var/log/sshd
. So the logging was managed by the init system and daemons where only configured to print logs to standard output/error. Also I've disabled (where possible) output of timestamps and configured them in mylogger
program, so I have similar logs date format across all system.My point of view here: even in daemon mode where out of the box proper behavior is a desired thing it is required to have additional options I've described above.
My thoughts on this:
The text was updated successfully, but these errors were encountered: