Andrew Yager
2020-Jul-24 00:10 UTC
[asterisk-users] Remove ANSI colour trings from log files only
Hi, Is there a way to drop the ANSI colour strings from log files? In particular, I've got JSON logging throwing logs over to ES, but they have the ANSI colour escape sequences. Ideally I don't want to lose coloured logs from the console though, and I can't "see" a way to do this. Ast 16 at the moment… Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200724/445d02ae/attachment.html>
Joel Serrano
2020-Jul-24 04:06 UTC
[asterisk-users] Remove ANSI colour trings from log files only
Have you tried starting asterisk with the "-n" param? -n Disable console colorization On Thu, Jul 23, 2020 at 5:11 PM Andrew Yager <andrew at rwts.com.au> wrote:> Hi, > > Is there a way to drop the ANSI colour strings from log files? In > particular, I've got JSON logging throwing logs over to ES, but they have > the ANSI colour escape sequences. > > Ideally I don't want to lose coloured logs from the console though, and I > can't "see" a way to do this. > > Ast 16 at the moment… > > Andrew > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200723/fe86ea32/attachment.html>
Joel Serrano
2020-Jul-24 04:16 UTC
[asterisk-users] Remove ANSI colour trings from log files only
Well I skipped reading the part where you say “only for log files” :-( On Thu, Jul 23, 2020 at 21:06 Joel Serrano <joel at textplus.com> wrote:> Have you tried starting asterisk with the "-n" param? > > -n Disable console colorization > > On Thu, Jul 23, 2020 at 5:11 PM Andrew Yager <andrew at rwts.com.au> wrote: > >> Hi, >> >> Is there a way to drop the ANSI colour strings from log files? In >> particular, I've got JSON logging throwing logs over to ES, but they have >> the ANSI colour escape sequences. >> >> Ideally I don't want to lose coloured logs from the console though, and I >> can't "see" a way to do this. >> >> Ast 16 at the moment… >> >> Andrew >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Check out the new Asterisk community forum at: >> https://community.asterisk.org/ >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200723/78b89934/attachment.html>
Tim Požár
2020-Jul-24 04:23 UTC
[asterisk-users] Remove ANSI colour trings from log files only
You can post process the logs with something like sed. See: https://superuser.com/questions/380772/removing-ansi-color-codes-from-text-stream On 7/23/20 5:10 PM, Andrew Yager wrote:> Hi, > > Is there a way to drop the ANSI colour strings from log files? In > particular, I've got JSON logging throwing logs over to ES, but they > have the ANSI colour escape sequences. > > Ideally I don't want to lose coloured logs from the console though, and > I can't "see" a way to do this. > > Ast 16 at the moment… > > Andrew >
Andrew Yager
2020-Jul-24 12:26 UTC
[asterisk-users] Remove ANSI colour trings from log files only
On Fri, 24 Jul 2020 at 14:23, Tim Požár <pozar at lns.com> wrote:> You can post process the logs with something like sed. See: > > > https://superuser.com/questions/380772/removing-ansi-color-codes-from-text-streamYeah; we're injesting using filebeat and you can do sed style parsing on lines into it using one fo the pipeline parsers; it' sjust a bit messy config wise when using the stnadard docker containers. But if it's not a "simple" answer it sounds like that's not a bad option. Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200724/1760ccf8/attachment.html>
Seemingly Similar Threads
- Remove ANSI colour trings from log files only
- Remove ANSI colour trings from log files only
- Colour coding the dialplan -- NoOp and ANSI codes?
- syslinux ansi <-> vesa color mapping
- Re: [PATCH nbdkit 2/2] tests: Test that public headers are ANSI (ISO C90) compatible.