Per Jessen schreef op 09-04-16 23:52:
Xen wrote:
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.
No, I'm sorry, I was not aware. Features of what?
Are you being wilfully thick? I'm sorry for the word. I mean that you mention those features yourself down below.
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?
[snip]
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.
That still does not explain why you _need_ your own syslog daemon and logrotation.
Nobody ever needs anything. Do you need education? No, you can just keeping working the farm all of your life. Do you want education? Well maybe the answer could be yes. Maybe you want to get ahead in life. Could you use education? Well most assuredly so. But do you need it? No. So why not ask why someone would want it or could use it. The answer could be much clearer then.
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.
Not much of a difference, I submit. Whether you use your own write2log() call or that of an existing library does not make a real difference, except in the packaging (if you plan to distribute your code).
I did not compare two equivalent modes of functionality. I compared one mode of functionality that is meagre, because you need to write it yourself for your application yourself. The other one is rich, because other people have written it with the idea of being used by a lot of people. The difference is they call him king, the difference frightens me. What I mean is very simple, and you already know the answer. 1. Anything you write yourself you will have to write from scratch if you cannot reuse someone else's code. 2. This will take a lot of energy and is less efficient than reusing existing code if you agree with that code. You DO understand why libraries exist in the first place right? So not everyone has to constantly reinvent the wheel. I mean are you just purposefully being thick here? I mean pretending not to understand so you won't have to reach a certain conclusion? So no, the difference is not packaging, the difference is effort required to reach a certain level of functionality. That's WHY you use existing libraries. Now if those libraries don't exist, you have a problem. A certain feature in the system ecosystem is missing. And if existing syslogd and logrotate do not fit your purposes, then what? Are there situations where a programmer could /use/ application-level logging functionality instead of system-wide features? Definitely. Why not? Why wouldn't there be? After all, you've notice that this is the raison d'être of Log4j in the first place. Why would it exist if there was no use for it? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org