Per Jessen schreef op 12-04-16 08:20:
Xen wrote:
I want something that can write to a file without having to configure it in syslog.
At some point you'll have to explain why write() doesn't suffice for that :-)
That's the same question as saying why "echo BLA >> file" doesn't suffice for that. Again, it is about having the features of (say, syslog/logrotate/cron) something a tad more advanced without having to write it yourself. Something that makes you say "hey, this is easy, now I can use that! :D". Anything that is going to be elegant requires a bit of investment, you know that. So to spell it out once more: * a library or platform or application that provides features that are similar to what syslog/logrotate/cron provides (at the very least, but it is also sufficient probably, depending on what you want) without depending on the system administrator to be able to use it in conjunction with your program. Anton responded with something but instead of explaining he just said it already exists and that he is the allpowerful user that already has everything I want ;-).
You can use it to log synchronously, asynchronously, to any database, to a syslog server, in any format you want, etc. etc. etc. But you understand.
Your question could perhaps have been better written as "is there a non-java equivalent of log4j?"
No because that question would imply that any solution for any language would suffice. The question was more about components that can also be used by Bash scripts, and it does not nearly need to be as advanced as log4j. See, the situation seems to be such that since system administrators can already use the existing solutions that require a bit of administrator intervention, nobody really has any desire for something else. I think Anton said that you can also run rsyslog(d) on some configuration file of your own? The features I asked for or was interested in learning existed, was really not something radically difficult or something. How difficult is it to consider that someone might have a need for something that already exists (but is used in a different way?). I mean you are really looking to make it harder than it is. Sometimes what a person wants is just exactly what he says. This draft is a bit older, I had forgotten about it a bit. Apologies for not completing it right away, I had to log out or reboot for some reason. I hate saving drafts ;-). I feel it is an injustice to the people I'd be sending my message to ;-). ! Whenever I want something in Linux, it is probably going to be a bit different ;-). In this case nobody would have a hard time understanding my requirements unless that person would think that my requirements were wrong. Like I mentioned in the thing that became the other thread, I would really like to be less dependent on root. Just yesterday someone posted a link of a guy who wiped all this backups and his files. With a single error in a shell script that was executed as root on a system that did not prevent that thing from happening. In Linux there are just two types of users (root and non-root) and a fun analogy is perhaps...... that I just read that in the Intel architecture there are 4 rings. But the Linux kernel only uses 2 of those: supervisor and normal user. There are four available and you only use two. Interesting. But the management model is equally primitive. A system in which you need to regularly use rm -rf as often as washing your hands, and yet that hand washing can destroy the entire building block in which you live. *not exactly well designed*. In GNU Linux apparently you are safeguarded because rm will normally not work on /. *what great safety, now I feel so safe*. Now by mistake I have to do rm -rf /* instead of rm -rf /. The backup administrator we talked about would have prevented that. But on this subject, I don't know what the OP wants anymore after we've written all of this. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org