@leverege/build-tools 2.5.34 → 2.5.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.5.34",
3
+ "version": "2.5.36",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/klog CHANGED
@@ -2,16 +2,20 @@
2
2
 
3
3
  [ -f overwhelm.yaml ] && [ -f package.json ] && npm run ahoy
4
4
 
5
- [ ! -x "$(command -v fzf)" ] && printf "\n***ERROR: Missing fzf fuzzy matcher => brew install fzf\n\n" && exit 1
5
+ DTS="`date +\"%Y%m%d-%H%M%S\"`"
6
+ PRETTY="pino-pretty -c -t 'HH:MM:ss.l'"
6
7
 
7
8
  if [ ! -z "$1" ];
8
9
  then
9
10
  NS=${2:-"default"}
10
- echo "NS=$NS"
11
- kubectl -n $NS logs deployment/$1 --follow=true --all-containers=true --since=10m
11
+ kubecmd="kubectl logs -f -n $NS -l app=$1 -c $1 | pino-pretty -c -t hh:mm:ss.l"
12
+ echo " run=[$kubecmd]"
13
+ eval ${kubecmd}
12
14
  exit $?
13
15
  fi
14
16
 
17
+ [ ! -x "$(command -v fzf)" ] && printf "\n***ERROR: Missing fzf fuzzy matcher => brew install fzf\n\n" && exit 1
18
+
15
19
  # Pipes the output from kubectl into the fuzzy matcher which will yield:
16
20
  # default message-processor-6b48cf68c6-8zblz 1/1 Running etc...
17
21
  KUBEOUT=$(kubectl get pods --all-namespaces -owide | fzf | awk '{print $1, $2}')
@@ -34,9 +38,8 @@ SLICED="${PODCHUNKS[@]:0:$CHOPLEN}"
34
38
  # keep in mind the slice above yields a string, so now we replace the spaces:
35
39
  # message-processor
36
40
  CONTAINER=${SLICED// /-}
37
- DTS="`date +\"%Y%m%d-%H%M%S\"`"
38
41
 
39
- kubecmd="kubectl logs --tail=50 --follow -c $CONTAINER --namespace $NAMESPACE $PODNAME | tee $CONTAINER-$DTS.log | pino-pretty"
42
+ kubecmd="kubectl logs --tail=50 --follow -c $CONTAINER --namespace $NAMESPACE $PODNAME | tee $CONTAINER-$DTS.log | $PRETTY"
40
43
  echo " run=[${kubecmd}]"
41
44
 
42
45
  eval ${kubecmd}