From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.jumo.net ([193.24.15.13]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ek7o4-000071-Dq for barebox@lists.infradead.org; Fri, 09 Feb 2018 12:29:34 +0000 Received: from dentln03.jumo.net ([10.10.0.23]:1395) by mail.jumo.net with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1ek7nm-0000Vu-1r for barebox@lists.infradead.org; Fri, 09 Feb 2018 13:29:14 +0100 MIME-Version: 1.0 From: Eugen Wiens Date: Fri, 9 Feb 2018 13:28:45 +0100 Message-Id: <20180209122845.4113-1-eugen.wiens@jumo.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] added colored print out of log levels To: barebox@lists.infradead.org Cc: Eugen Wiens V2hlbiB0aGUgc3lzdGVtIGlzIGJvb3RpbmcgdGhlIHdhcm5pbmdzIGFuZCBlcnJvcnMgYXJlIG5v dCBiZSBxdWlja2x5IGRpc2NvdmVyZWQuDQpXaXRoIHRoaXMgaW1wcm92ZW1lbnQgdGhlIGVycm9y cyBhcmUgY29sb3JlZCByZWQsIHRoZSB3YXJuaW5ncyB5ZWxsb3cgYW5kIHRoZSBub3RpY2VzIGJs dWUuDQoNClNpZ25lZC1vZmYtYnk6IEV1Z2VuIFdpZW5zIDxldWdlbi53aWVuc0BqdW1vLm5ldD4N Ci0tLQ0KIGNvbW1vbi9LY29uZmlnICAgICAgICAgIHwgIDggKysrKysrKysNCiBjb21tb24vY29u c29sZV9jb21tb24uYyB8IDI5ICsrKysrKysrKysrKysrKysrKysrKysrKysrKystDQogMiBmaWxl cyBjaGFuZ2VkLCAzNiBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pDQoNCmRpZmYgLS1naXQ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