There's so many way to send logs to an elk... logspout, filebeat, journalbeat, etc.
But docker has a gelf log driver and logstash a gelf input. So here we are.
Here is a docker-compose to test a full elk with a container sending logs via gelf.
| # Count SLOC | |
| export SLF=`mktemp -t cljsloc`; find src test -name "*.clj" | xargs egrep -v "(^[[:space:]]*$|^[[:space:]]*;)" | cut -d: -f1 > $SLF && echo "Files"; uniq -c $SLF; echo "Total" `cat $SLF | wc -l`; rm $SLF |
There's so many way to send logs to an elk... logspout, filebeat, journalbeat, etc.
But docker has a gelf log driver and logstash a gelf input. So here we are.
Here is a docker-compose to test a full elk with a container sending logs via gelf.
wget "http://kartat.kapsi.fi/files/kuntajako/kuntajako_4500k/etrs89/shp/TietoaKuntajaosta_2017_4500k.zip"
unzip TietoaKuntajaosta_2017_4500k.zip
ogr2ogr -f GeoJSON -t_srs crs:84 SuomenKuntajako_2017_4500k.geo.json SuomenKuntajako_2017_4500k.shp| (require '[clojure.set :as set]) | |
| (def info | |
| [{:year 2017 | |
| :month 4 | |
| :data "x"} | |
| {:year 2017 | |
| :month 4 | |
| :data "y"} |
Using JavaScript libraries from ClojureScript involves two distinct concerns:
Right now, the only single tool that solves these probems reliably, optimally, and with minimal configuration is shadow-cljs, and so that is what I favor. In paricular, shadow-cljs lets you install npm modules using npm or yarn and uses the resulting package.json to bundle external dependencies. Below I describe why, what alternatives there are, and what solutions I disfavor at this time.
| (ns text-field | |
| (:require | |
| [goog.object :as gobj] | |
| [reagent.core] | |
| ;; Note that this particular `:require` vector is for shadow-cljs. | |
| ;; Other build tools might use different conventions. | |
| ["@material-ui/core/TextField" :default TextField])) | |
| ;; Copied from `re-com.util`. | |
| (defn deref-or-value |