(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:KUBE_VERBOSE) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name KUBE_VERBOSE> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(5)}) spids: [49 53] ) ) } spids: [47] ) ] spids: [47] ) (FuncDef name: "kube::log::errexit" body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:err) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name PIPESTATUS> bracket_op: (WholeArray op_id:Lit_At) spids: [80 85] ) ) } spids: [78] ) ] spids: [76] ) (AndOr children: [ (Pipeline children: [(C {(set)} {(Lit_Other "+") (o)}) (C {(grep)} {(-qe)} {(DQ ("-o errexit"))})] negated: False ) (ControlFlow token:<ControlFlow_Return return>) ] op_id: Op_DPipe ) (C {(set)} {(Lit_Other "+") (o)} {(xtrace)}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:code) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(1)}) spids: [131 135] ) ) } spids: [129] ) ] spids: [127] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other "[")} { (BracedVarSub token: <VSub_Name FUNCNAME> prefix_op: VSub_Pound bracket_op: (WholeArray op_id:Lit_At) spids: [147 153] ) } {(-gt)} {(2)} {(Lit_Other "]")} ) ] action: [ (C {(kube) (Lit_Other ":") (Lit_Other ":") (log) (Lit_Other ":") (Lit_Other ":") (error) } {(DQ ("Call tree:"))} ) (ForExpr init: (BinaryAssign op_id: Arith_Equal left: (LhsName name:i) right: (ArithWord w:{(Lit_Digits 1)}) ) cond: (ArithBinary op_id: Arith_Less left: (ArithVarRef name:i) right: (ArithBinary op_id: Arith_Minus left: (ArithWord w: { (BracedVarSub token: <VSub_Name FUNCNAME> prefix_op: VSub_Pound bracket_op: (WholeArray op_id:Lit_At) spids: [187 193] ) } ) right: (ArithWord w:{(Lit_Digits 1)}) ) ) update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i)) body: (DoGroup children: [ (C {(kube) (Lit_Other ":") (Lit_Other ":") (log) (Lit_Other ":") (Lit_Other ":") (error) } { (DQ (" ") ($ VSub_Name "$i") (": ") (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{($ VSub_Name "$i")}) right: (ArithWord w:{(Lit_Digits 1)}) ) ) spids: [218 225] ) (":") (BracedVarSub token: <VSub_Name BASH_LINENO> bracket_op: (ArrayIndex expr:(ArithWord w:{($ VSub_Name "$i")})) spids: [227 232] ) (" ") (BracedVarSub token: <VSub_Name FUNCNAME> bracket_op: (ArrayIndex expr:(ArithWord w:{($ VSub_Name "$i")})) spids: [234 239] ) ("(...)") ) } ) ] spids: [203 244] ) ) ] spids: [-1 162] ) ] spids: [-1 247] ) (C {(kube) (Lit_Other ":") (Lit_Other ":") (log) (Lit_Other ":") (Lit_Other ":") (error_exit)} { (DQ ("Error in ") (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 1)})) spids: [261 266] ) (":") (BracedVarSub token: <VSub_Name BASH_LINENO> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [268 273] ) (". '") (${ VSub_Name BASH_COMMAND) ("' exited with status ") ($ VSub_Name "$err") ) } { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(1)}) spids: [283 287] ) ) } {(1)} ) ] spids: [73] ) spids: [63 72] ) (FuncDef name: "kube::log::install_errexit" body: (BraceGroup children: [(C {(trap)} {(SQ <"kube::log::errexit">)} {(ERR)}) (C {(set)} {(-o)} {(errtrace)})] spids: [305] ) spids: [295 304] ) (FuncDef name: "kube::log::stack" body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:stack_skip) op: Equal rhs: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(0)}) spids: [371 375] ) } spids: [370] ) ] spids: [368] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:stack_skip) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:stack_skip) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [379 386] ) } spids: [378] ) ] spids: [378] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_gt left: { (BracedVarSub token: <VSub_Name FUNCNAME> prefix_op: VSub_Pound bracket_op: (WholeArray op_id:Lit_At) spids: [393 399] ) } right: {($ VSub_Name "$stack_skip")} ) ) terminator: <Op_Semi ";"> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Call stack:"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[417])] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:i) op:Equal spids:[423])] spids: [421] ) (ForExpr init: (BinaryAssign op_id: Arith_Equal left: (LhsName name:i) right: (ArithWord w:{(Lit_Digits 1)}) ) cond: (ArithBinary op_id: Arith_LessEqual left: (ArithVarRef name:i) right: (ArithBinary op_id: Arith_Minus left: (ArithWord w: { (BracedVarSub token: <VSub_Name FUNCNAME> prefix_op: VSub_Pound bracket_op: (WholeArray op_id:Lit_At) spids: [439 445] ) } ) right: (ArithWord w:{($ VSub_Name "$stack_skip")}) ) ) update: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i)) body: (DoGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:frame_no) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithBinary op_id: Arith_Minus left: (ArithVarRef name:i) right: (ArithWord w:{(Lit_Digits 1)}) ) right: (ArithVarRef name:stack_skip) ) spids: [465 476] ) } spids: [464] ) ] spids: [462] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:source_file) op: Equal rhs: { (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr: (ArithWord w:{($ VSub_Name "$frame_no")}) ) spids: [482 487] ) } spids: [481] ) ] spids: [479] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:source_lineno) op: Equal rhs: { (BracedVarSub token: <VSub_Name BASH_LINENO> bracket_op: (ArrayIndex expr: (ArithWord w: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithVarRef name:frame_no) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [496 503] ) } ) ) spids: [493 505] ) } spids: [492] ) ] spids: [490] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:funcname) op: Equal rhs: { (BracedVarSub token: <VSub_Name FUNCNAME> bracket_op: (ArrayIndex expr: (ArithWord w:{($ VSub_Name "$frame_no")}) ) spids: [511 516] ) } spids: [510] ) ] spids: [508] ) (SimpleCommand words: [ {(echo)} { (DQ (" ") ($ VSub_Name "$i") (": ") (${ VSub_Name source_file) (":") (${ VSub_Name source_lineno) (" ") (${ VSub_Name funcname) ("(...)") ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: -1 arg_word: {(2)} spids: [539] ) ] ) ] spids: [459 543] ) ) ] spids: [-1 408] ) ] spids: [-1 546] ) ] spids: [365] ) spids: [355 364] ) (FuncDef name: "kube::log::error_exit" body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:message) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [583 586] ) ) } spids: [581] ) ] spids: [579] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:code) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(1)}) spids: [594 598] ) ) } spids: [592] ) ] spids: [590] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:stack_skip) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 3> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(0)}) spids: [606 610] ) ) } spids: [604] ) ] spids: [602] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:stack_skip) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:stack_skip) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [615 622] ) } spids: [614] ) ] spids: [614] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_ge left: {(${ VSub_Name KUBE_VERBOSE)} right: {(4)} ) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:source_file) op: Equal rhs: { (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr: (ArithWord w:{($ VSub_Name "$stack_skip")}) ) spids: [647 652] ) } spids: [646] ) ] spids: [644] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:source_line) op: Equal rhs: { (BracedVarSub token: <VSub_Name BASH_LINENO> bracket_op: (ArrayIndex expr: (ArithWord w: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithVarRef name:stack_skip) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [661 668] ) } ) ) spids: [658 670] ) } spids: [657] ) ] spids: [655] ) (SimpleCommand words: [ {(echo)} { (DQ ("!!! Error in ") (${ VSub_Name source_file) (":") (${ VSub_Name source_line) ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[686])] ) (AndOr children: [ (DBracket expr: (BoolUnary op_id: BoolUnary_z child: { (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{}) spids: [694 697] ) } ) ) (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ (" ") (${ VSub_Number 1))}] redirects: [ (Redir op_id: Redir_GreatAnd fd: -1 arg_word: {(2)} spids: [715] ) ] ) ] spids: [703] ) ] op_id: Op_DPipe ) (C {(kube) (Lit_Other ":") (Lit_Other ":") (log) (Lit_Other ":") (Lit_Other ":") (stack) } {($ VSub_Name "$stack_skip")} ) (SimpleCommand words: [{(echo)} {(DQ ("Exiting with status ") (${ VSub_Name code))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[744])] ) ] spids: [-1 641] ) ] spids: [-1 748] ) (C {(exit)} {(DQ (${ VSub_Name code))}) ] spids: [576] ) spids: [566 575] ) (FuncDef name: "kube::log::error" body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:timestamp) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(date)} {(Lit_Other "+") (DQ ("[%m%d %H:%M:%S]"))})] ) left_token: <Left_CommandSub "$("> spids: [780 787] ) } spids: [779] ) ] spids: [779] ) (SimpleCommand words: [ {(echo)} { (DQ ("!!! ") ($ VSub_Name "$timestamp") (" ") (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )}) spids: [796 799] ) ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[802])] ) (C {(shift)}) (ForEach iter_name: message do_arg_iter: True body: (DoGroup children: [ (SimpleCommand words: [{(echo)} {(DQ (" ") ($ VSub_Name "$message"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[824])] ) ] spids: [814 828] ) spids: [-1 -1] ) ] spids: [776] ) spids: [766 775] ) (FuncDef name: "kube::log::usage" body: (BraceGroup children: [ (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[851])] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:message) op:Equal spids:[857])] spids: [855] ) (ForEach iter_name: message do_arg_iter: True body: (DoGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name "$message"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[874])] ) ] spids: [865 878] ) spids: [-1 -1] ) (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[883])] ) ] spids: [846] ) spids: [836 845] ) (FuncDef name: "kube::log::usage_from_stdin" body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:messages) op: Equal rhs: {(ArrayLiteralPart)} spids: [904] ) ] spids: [902] ) (While cond: [(Sentence child:(C {(read)} {(-r)} {(line)}) terminator:<Op_Semi ";">)] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:messages) op: PlusEqual rhs: {(ArrayLiteralPart words:[{(DQ ($ VSub_Name "$line"))}])} spids: [921] ) ] spids: [921] ) ] spids: [918 929] ) ) (C {(kube) (Lit_Other ":") (Lit_Other ":") (log) (Lit_Other ":") (Lit_Other ":") (usage)} { (DQ (BracedVarSub token: <VSub_Name messages> bracket_op: (WholeArray op_id:Lit_At) spids: [942 947] ) ) } ) ] spids: [899] ) spids: [889 898] ) (FuncDef name: "kube::log::info" body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:V) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name V> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(0)}) spids: [973 977] ) ) } spids: [971] ) ] spids: [969] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: Redir_Less left: {($ VSub_Name "$KUBE_VERBOSE")} right: {($ VSub_Name "$V")} ) ) terminator: <Op_Semi ";"> ) ] action: [(ControlFlow token:<ControlFlow_Return return>)] spids: [-1 994] ) ] spids: [-1 1000] ) (ForEach iter_name: message do_arg_iter: True body: (DoGroup children: [(C {(echo)} {(DQ ($ VSub_Name "$message"))})] spids: [1009 1019] ) spids: [-1 -1] ) ] spids: [966] ) spids: [956 965] ) (FuncDef name: "kube::log::progress" body: (BraceGroup children: [ (ForEach iter_name: message do_arg_iter: True body: (DoGroup children: [(C {(echo)} {(-e)} {(-n)} {(DQ ($ VSub_Name "$message"))})] spids: [1045 1059] ) spids: [-1 -1] ) ] spids: [1037] ) spids: [1027 1036] ) (FuncDef name: "kube::log::info_from_stdin" body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:messages) op: Equal rhs: {(ArrayLiteralPart)} spids: [1079] ) ] spids: [1077] ) (While cond: [(Sentence child:(C {(read)} {(-r)} {(line)}) terminator:<Op_Semi ";">)] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:messages) op: PlusEqual rhs: {(ArrayLiteralPart words:[{(DQ ($ VSub_Name "$line"))}])} spids: [1096] ) ] spids: [1096] ) ] spids: [1093 1104] ) ) (C {(kube) (Lit_Other ":") (Lit_Other ":") (log) (Lit_Other ":") (Lit_Other ":") (info)} { (DQ (BracedVarSub token: <VSub_Name messages> bracket_op: (WholeArray op_id:Lit_At) spids: [1117 1122] ) ) } ) ] spids: [1074] ) spids: [1064 1073] ) (FuncDef name: "kube::log::status" body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:V) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name V> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(0)}) spids: [1148 1152] ) ) } spids: [1146] ) ] spids: [1144] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: Redir_Less left: {($ VSub_Name "$KUBE_VERBOSE")} right: {($ VSub_Name "$V")} ) ) terminator: <Op_Semi ";"> ) ] action: [(ControlFlow token:<ControlFlow_Return return>)] spids: [-1 1169] ) ] spids: [-1 1175] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:timestamp) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(date)} {(Lit_Other "+") (DQ ("[%m%d %H:%M:%S]"))})] ) left_token: <Left_CommandSub "$("> spids: [1180 1187] ) } spids: [1179] ) ] spids: [1179] ) (C {(echo)} {(DQ ("+++ ") ($ VSub_Name "$timestamp") (" ") ($ VSub_Number "$1"))}) (C {(shift)}) (ForEach iter_name: message do_arg_iter: True body: (DoGroup children: [(C {(echo)} {(DQ (" ") ($ VSub_Name "$message"))})] spids: [1208 1219] ) spids: [-1 -1] ) ] spids: [1141] ) spids: [1131 1140] ) ] )