[systemd-devel] Select on value of log message

Jérémy Rosen jeremy.rosen at smile.fr
Thu Aug 30 07:57:41 UTC 2018


One of the big advantage of --grep compared to |grep is that it returns 
the whole message, not just the line containig your regex

so you can combine it with "-o verbose" and get all the info on the 
message easily

On 29/08/2018 20:09, Uoti Urpala wrote:
> On Wed, 2018-08-29 at 19:49 +0200, Cecil Westerhof wrote:
>> There are a lot of ways you can select the output you get from
>> journalctl, but it seems you cannot select on the message itself.
>> That is why I need to do something like:
>>       journalctl | grep 'Database is locked'
>>
>> Is this true, or am I overlooking something?
> Since version 237, journalctl has had a --grep option.
>
> Message text is not indexed, so performance-wise this still requires
> going through all messages (as limited by other options).
>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- 
SMILE <http://www.smile.eu/>

20 rue des Jardins
92600 Asnières-sur-Seine

	
*Jérémy ROSEN*
Architecte technique
Responsable de l'expertise Smile-ECS

email jeremy.rosen at smile.fr <mailto:jeremy.rosen at smile.fr>
phone +33141402967
url http://www.smile.eu

Twitter <https://twitter.com/GroupeSmile> Facebook 
<https://www.facebook.com/smileopensource> LinkedIn 
<https://www.linkedin.com/company/smile> Github 
<https://github.com/Smile-SA>


Découvrez l’univers Smile, rendez-vous sur smile.eu 
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>

eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180830/1eec792d/attachment.html>


More information about the systemd-devel mailing list