Mailinglist Archive: yast-devel (163 mails)

< Previous Next >
[yast-devel] RFC logs API, settings
  • From: "Duncan Mac-Vicar Prett" <dmacvicar@xxxxxxx>
  • Date: Thu, 10 Sep 2009 10:34:53 +0200
  • Message-id: <200909101034.53599.dmacvicar@xxxxxxx>

Right now there is a resource /logs which support only index (in all formats)
and show (only in txt format)

<logs type="array">
<description>System messages</description>

The other supported API is /logs/id?lines=x which only answers in .txt format.

I experimented with two ways to define those logs, you can't pass an arbitrary
filename to the API because that would be a security hole, but you can define
them in vendor config files. Here are the two approaches.

1) in /etc/YaST2/vendor.yml together with other vendor settings:

- mydb-server
- mydb-console
- /var/log/messages
- /var/log/apache2/access_log

And then you get them as /logs/0, logs/1

However, this has the drawback that you dont know anything else from the log
to display it in the user interface.

Then a second approach,

cat /etc/YaST2/vendor/logs.yml
path: /var/log/messages
description: System messages
description: Apache
path: /var/log/apache2/access_log

Then the client can display more information about them.

Which approach seems better? simplicity vs usefulness?

Duncan Mac-Vicar P. - Engineering Manager, YaST
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages