Skip to content

Commit c774724

Browse files
committed
Update init to always hide log files.
(Unless the FF_LOG environment variable is set to 'stdout'
1 parent 79295f7 commit c774724

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

video/private/init.rkt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#lang racket/base
22

33
#|
4-
Copyright 2016-2017 Leif Andersen
4+
Copyright 2016-2018 Leif Andersen
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -140,18 +140,20 @@
140140
(define (finish-execution v)
141141
(set-racket-log-callback #f))
142142
(will-register callback-executor callback-proc finish-execution)
143-
(when (and (not (equal? (getenv "FF_LOG") "stdout")) (ffmpeg-installed?) (libvid-installed?))
144-
(set-racket-log-callback callback-proc)
145-
(av-log-set-callback ffmpeg-log-callback)
146-
(thread
147-
(λ ()
148-
(will-execute callback-executor)))
149-
(plumber-add-flush!
150-
(current-plumber)
151-
(λ (handler)
152-
(stop-ffmpeg-logging)))
153-
(void))
154-
143+
(unless (equal? (getenv "FF_LOG") "stdout")
144+
(av-log-set-callback #f)
145+
(when (ffmpeg-installed?) (libvid-installed?)
146+
(set-racket-log-callback callback-proc)
147+
(av-log-set-callback ffmpeg-log-callback)
148+
(thread
149+
(λ ()
150+
(will-execute callback-executor)))
151+
(plumber-add-flush!
152+
(current-plumber)
153+
(λ (handler)
154+
(stop-ffmpeg-logging)))
155+
(void)))
156+
155157
;; Because portaudio has a nasty tendency to output a lot of garbadge to stdout, only
156158
;; require it in situations where its actually needed.
157159
(module* portaudio racket

0 commit comments

Comments
 (0)