Skip to content

Commit 62d835e

Browse files
committed
added μ/log compilation
1 parent 9d4bcc8 commit 62d835e

File tree

5 files changed

+70
-0
lines changed

5 files changed

+70
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Here the list of libraries tested:
3434
| :white_check_mark: | [hiccup](./hiccup) | Fast library for rendering HTML in Clojure | |
3535
| :white_check_mark: | [http-kit](./http-kit) | Web server and server | |
3636
| :x: | [monger](./monger) | An idiomatic Clojure MongoDB driver with sane defaults | |
37+
| :white_check_mark: | [μ/log](./mulog) | Event logging system | |
3738
| :white_check_mark: | [next.jdbc + honeysql](./next-jdbc) | Database driver and SQL-in-Clojure | |
3839
| :warning: | [nippy](./nippy) | Clojure serialization/deserialization library | *Can't serialize exceptions* |
3940
| :white_check_mark: | [ring/jetty](./ring-jetty) | Web server | |

mulog/.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/target
2+
/classes
3+
/checkouts
4+
profiles.clj
5+
pom.xml
6+
pom.xml.asc
7+
*.jar
8+
*.class
9+
/.lein-*
10+
/.nrepl-port
11+
.hgignore
12+
.hg/

mulog/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Mulog
2+
3+
Compilation and configuration of [***μ/log***](https://github.com/BrunoBonacci/mulog)
4+
Support for GraalVM native compilation was added in version `[com.brunobonacci/mulog "0.7.0"]`
5+
6+
## Usage
7+
8+
Currently testing:
9+
10+
[com.brunobonacci/mulog "0.7.0"]
11+
12+
Test with:
13+
14+
lein do clean, uberjar, native, run-native
15+
16+
17+
Add any info might be useful for the reader.

mulog/project.clj

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
(defproject sample-project "0.1.0"
2+
3+
:dependencies [[org.clojure/clojure "1.10.3"]
4+
[com.brunobonacci/mulog "0.7.0-SNAPSHOT"]
5+
;; add the library here
6+
]
7+
8+
:main simple.main
9+
10+
:uberjar-name "simple-main.jar"
11+
12+
:profiles {:uberjar {:aot :all}
13+
:dev {:plugins [[lein-shell "0.5.0"]]}}
14+
15+
:aliases
16+
{"native"
17+
["shell"
18+
"native-image" "--report-unsupported-elements-at-runtime" "--no-server" "--no-fallback"
19+
"--trace-object-instantiation=java.lang.Thread"
20+
"--initialize-at-build-time"
21+
"-jar" "./target/${:uberjar-name:-${:name}-${:version}-standalone.jar}"
22+
"-H:Name=./target/${:name}"]
23+
24+
"run-native" ["shell" "./target/${:name}"]})

mulog/src/simple/main.clj

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(ns simple.main
2+
(:require [com.brunobonacci.mulog :as u])
3+
(:gen-class))
4+
5+
;;
6+
;; Update this file to use the libary you wish to test.
7+
;;
8+
9+
10+
(defn -main []
11+
(u/log ::hello :to "GraalVM")
12+
(let [p (u/start-publisher! {:type :console :pretty? true})]
13+
(Thread/sleep 1000)
14+
;; stopping publisher
15+
(p))
16+
(println "DONE"))

0 commit comments

Comments
 (0)