Skip to content

Commit

Permalink
Fix another js/__dirname instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Oct 12, 2024
1 parent 2ef5ac0 commit 0e96412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sitefox/logging.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Rebinds `console.log` and `console.error` so that they write to `./logs/error.log` as well as stdout."
[]
(when (not (aget js/console "_logstream"))
(let [logs (str js/__dirname "/logs")
(let [logs (str (or js/__dirname ".") "/logs")
error-log (.createStream rfs "error.log" (clj->js {:interval "7d" :path logs :teeToStdout true}))
log-fn (fn [& args]
(let [date (.toISOString (js/Date.))
Expand Down

0 comments on commit 0e96412

Please sign in to comment.