1 |
20.02.2014 15:33, Nicolas Sebrecht пишет: |
2 |
> The 20/02/14, Yuri K. Shatroff wrote: |
3 |
> |
4 |
>>> (see [2]) will print the status of the Apache web server, and also the |
5 |
>>> last lines from the logs. You can control how many lines. You can |
6 |
>>> check also with the journal, as I showed up. |
7 |
>> |
8 |
>> I believe it would be a 5-minutes job to add the capability of printing |
9 |
>> last N log entries for a service to `rc-service status`. Using cat, grep |
10 |
> |
11 |
> If I understand you correctly, what you're proposing is an analyzing |
12 |
> tool which works after-the-facts. |
13 |
|
14 |
I wasn't proposing anything. I was just supposing. |
15 |
|
16 |
> I mean extracting the per-daemon logs |
17 |
> from a global log archive whereas systemd works the opposite way, AFAIU. |
18 |
|
19 |
What is a 'global log archive'? Do you mean a single file where all logs |
20 |
go? AFAIK you can set up syslog to log all messages into one file as |
21 |
well as per-service files. So the deal is just to extract configuration |
22 |
from syslog. Of course, if the services are using it, not keeping their |
23 |
own logs as is usually the case of apache. As a multiuser (multi-vhost) |
24 |
webserver admin I have to set up apache to log into users' home |
25 |
directories, so I even don't know how many user logs there really are. |
26 |
And I don't need to, because I've got my own global log. But a user is |
27 |
definitely more familiar with a text file he/she can download via FTP, |
28 |
than with a journalctl wrapper which he has to know how to use (and also |
29 |
be granted SSH access to use), at the least which parameters to specify, |
30 |
if at all usable in such setups. |
31 |
|
32 |
> You solution requires per-daemon extraction rules and have to be |
33 |
> maintained over time. So, postponed to errors. |
34 |
|
35 |
I don't need such 'solutions' to non-existent problems. But if there |
36 |
were a *real* necessity to pretty-print a log's tail in service status, |
37 |
I think it would have been a matter of a proper setup (i.e. the service |
38 |
using syslog, hence a defined log format) and not a heck more complicated. |
39 |
|
40 |
> Definetly not a 5-minutes job. |
41 |
|
42 |
5 minutes is even too much to type sort of |
43 |
tail -${LINES} ${SERVICE}.log |
44 |
if you know where to look up LINES and SERVICE. |
45 |
|
46 |
-- |
47 |
Regards, |
48 |
Yuri K. Shatroff |