Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Remove ANSI colour trings from log files only


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
andrew at rwts.com.au
Guest





PostPosted: Thu Jul 23, 2020 7:11 pm    Post subject: [asterisk-users] Remove ANSI colour trings from log files on Reply with quote

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
Back to top
joel at textplus.com
Guest





PostPosted: Thu Jul 23, 2020 11:07 pm    Post subject: [asterisk-users] Remove ANSI colour trings from log files on Reply with quote

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@rwts.com.au (andrew@rwts.com.au)> wrote:

Quote:
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
Back to top
joel at textplus.com
Guest





PostPosted: Thu Jul 23, 2020 11:17 pm    Post subject: [asterisk-users] Remove ANSI colour trings from log files on Reply with quote

Well I skipped reading the part where you say “only for log files” Sad 


On Thu, Jul 23, 2020 at 21:06 Joel Serrano <joel@textplus.com (joel@textplus.com)> wrote:

Quote:
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@rwts.com.au (andrew@rwts.com.au)> wrote:

Quote:
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

Back to top
pozar at lns.com
Guest





PostPosted: Thu Jul 23, 2020 11:23 pm    Post subject: [asterisk-users] Remove ANSI colour trings from log files on Reply with quote

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:
Quote:
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
Back to top
andrew at rwts.com.au
Guest





PostPosted: Fri Jul 24, 2020 7:27 am    Post subject: [asterisk-users] Remove ANSI colour trings from log files on Reply with quote

On Fri, 24 Jul 2020 at 14:23, Tim Požár <pozar@lns.com (pozar@lns.com)> wrote:

Quote:
You can post process the logs with something like sed.  See:

https://superuser.com/questions/380772/removing-ansi-color-codes-from-text-stream




Yeah; 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 
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services