[Mageia-dev] [soft-commits] [6435] Added a first log viewer module.

Angelo Naselli anaselli at linux.it
Mon Nov 12 13:09:55 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>> +#- check services +my ) . Data::Dumper->Dump([ $service ],
>>> [qw(*services)]) . q( +foreach (split(':', $options{SERVICES}))
>>> { +    next unless $services{$_}; +    $r .= "Service $_
>>> ($services{$_} is not running)\\n" unless -e 
>>> "/var/lock/subsys/$_"; +}
>> You shouldn't leave debugging statement in your code. Moreover, I
>> doubt this is syntactically correct. Do you use Test::Compile to
>> check your code compiles correctly ?
> 
> Also /var/log/subsys is almost dead under systemd anyway. It's
> still used by a few legacy initscripts that systemd calls, but I'm
> not sure where this is going.
Ehm the above code is the draklog one, and it was use to create a
wizard to setup mail alert.
It's not implemented yet, in the new log viewer so any new input can be
added now.


> Also, if you are implementing a new log viewer module, is this
> going to use the systemd journal rather than implementing it's own
> complex logic for parsing compressed text files? I've not looked at
> the code, but it would be *awesome* if this is what was happening
> :)
> 
> It's very easy to use the journal APIs (either by linking the
> library, using python bindings - not sure if there are external
> perl bindings yet, but I wouldn't be surprised if there are - or
> simply calling journalctl on the command line and parsing the
> result. It offers an easy to parse JSON format so even going via
> this route should be trivial if official bindings do not exist).
> You can get all logs between certain dates and for particular
> services with ease, without having to look in the right file or
> grep for the right binary. i.e. all the building blocks are in
> place for you :)
I read your comment in draklog bug, i have taken a note and i will
ask you to explain it better to me, since i'm not very familiar with
all this stuff.

About binding, well libyui allows also to use python and ruby,
so rewriting my rubbish - quoting Steven :p - to re-implementing
another rubbish in python it could be possible and easy :D

Anyway, Col ehm you could help in this project...
...we will be very happy :D

Cheers,
	Angelo (who continues trying involve people :D)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlCg5xAACgkQqEs9DA4DquCx1QCeN8xtJ06uUohpR0WpHzqYbbfI
xoAAn0KHEx34+MHXlr7J+hS6Jp4EGqCD
=aDG5
-----END PGP SIGNATURE-----


More information about the Mageia-dev mailing list