Per Jessen schreef op 09-04-16 17:49:
Xen wrote:
Wouldn't privileged users fit in between root and regular users?
Those would be users that have specific sudo access right. Other than that? And those users would be privileged to run commands as root, or just a few of those.
What if I write an application and I want to run it on a shell server on which I am just a guest. I want it to do logging within my personal user space. Now what?
Just write to a file?
The whole point was features remember.
Now I need to ship my application with its own syslog daemon and logrotate facility? Maybe actually log4j also does those things so I don't need anything for java applications.
Why would you need your own syslog daemon and logrotation?
Log4J actually provides the kind of formatting and logrotation as an embedded program library in pretty much the same way that syslogd and logrotation do. Except that it is now a simple system call (API call) to some jar file that gets shipped with the application. So the answer to your question is really simple: to have those features as part of my program instead of as part of the system on which the program runs.
But on Linux, I seem to be required to use existing daemons that are system-wide, I don't know.
Applications that don't fit into to the syslog categories/facilities should probably just write their own logs. Examples - mysql, squid, apache, vsftp, zypper, snmp, plenty of them. Perhaps you can describe the problem in some more detail, I'm not sure I've really understood it.
There is a different between writing your own logs without any kind of functionality, and writing your own logs when an API for that is already present as part of existing libraries. An application should be able to control what file its output goes to -- or even what remote syslog, database, etc. Now what the OP asked for was really that: a version of the "logger" program that can do that stuff without requiring system configuration. Or at least, that would be very advanteous to me. And the simple fact is that this log4j also provides that. That means e.g. that you could probably write a front-end to log4j and have these features with minimal effort (but it would be a java program). The only effort would be in creating the front-end interface (command line options, etc.). Again, it is simply about having features but not having them located in the system, but closer to the application. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org