weirdness with hipchat
Date: February 19, 2013
so for work we use hipchat which is pretty cool for what we use it for, but i discovered a little issue when copy/pasting configs in there to send to coworkers; it adds extra bytes to the file.
example:
this is what was originally passed through the wire :
2013-02-19 22:19:25,144 INFO    [config] Logging Configured
2013-02-19 22:19:25,144 INFO    [config] ROOT_PATH: /home/vagrant/real_outland
2013-02-19 22:19:25,206 INFO    [config] init called, test mode: False
but, lets look at it through od (octal, decimal, hex, ASCII dump) with “-c” switch (-c Output C-style escaped characters. Equivalent to -t c.)
first on osx using iterm2 and tmux:
0000000 2 0 1 3 - 0 2 - 1 9 2 2 : 1 9
0000020 : 2 5 , 1 4 4 I N F O   ** **
0000040   ** ** [ c o n f i g ] L o g
0000060 g i n g C o n f i g u r e d \n
0000100 2 0 1 3 - 0 2 - 1 9 2 2 : 1 9
0000120 : 2 5 , 1 4 4 I N F O   ** **
0000140   ** ** [ c o n f i g ] R O O
0000160 T _ P A T H : / h o m e / v a
0000200 g r a n t / r e a l _ o u t l a
0000220 n d \n 2 0 1 3 - 0 2 - 1 9 2 2
0000240 : 1 9 : 2 5 , 2 0 6 I N F O
0000260 ** **   ** ** [ c o n f i g ]
0000300 i n i t c a l l e d , t e s
0000320 t m o d e : F a l s e
now in gentoo using urxvt:
0000000 2 0 1 3 - 0 2 - 1 9 2 2 : 1 9
0000020 : 2 5 , 1 4 4 I N F O 342 200 202
0000040 342 200 202 [ c o n f i g ] L o g
0000060 g i n g C o n f i g u r e d \n
0000100 2 0 1 3 - 0 2 - 1 9 2 2 : 1 9
0000120 : 2 5 , 1 4 4 I N F O 342 200 202
0000140 342 200 202 [ c o n f i g ] R O O
0000160 T _ P A T H : / h o m e / v a
0000200 g r a n t / r e a l _ o u t l a
0000220 n d \n 2 0 1 3 - 0 2 - 1 9 2 2
0000240 : 1 9 : 2 5 , 2 0 6 I N F O 342
0000260 200 202 342 200 202 [ c o n f i g ]
0000300 i n i t c a l l e d , t e s
0000320 t m o d e : F a l s e
you see the “** **” & “342 200 202” that are being added in some of the lines ?
here is the same thing when the hipchat client is removed all together:
0000000 2 0 1 3 - 0 2 - 1 9 2 2 : 1 9
0000020 : 2 5 , 1 4 4 I N F O
0000040 [ c o n f i g ] L o g g i n g
0000060 C o n f i g u r e d \n 2 0 1 3
0000100 - 0 2 - 1 9 2 2 : 1 9 : 2 5 ,
0000120 1 4 4 I N F O [ c o n
0000140 f i g ] R O O T _ P A T H :
0000160 / h o m e / v a g r a n t / r e
0000200 a l _ o u t l a n d \n 2 0 1 3 -
0000220 0 2 - 1 9 2 2 : 1 9 : 2 5 , 2
0000240 0 6 I N F O [ c o n f
0000260 i g ] i n i t c a l l e d ,
0000300 t e s t m o d e : F a l s
0000320 e
this wreaked havoc on our chef knife.rb files and was giving us a couple of weird errors.
when in doubt, od -c.
Leave a Reply