feat(sterni/mblog): implement environment based config mechanism
Change-Id: I091c0d5decc0a1eb3d24e81b713434ab391c677d Reviewed-on: https://cl.tvl.fyi/c/depot/+/8347 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
fee0c83915
commit
80e168b22d
6 changed files with 54 additions and 14 deletions
|
|
@ -1,5 +1,5 @@
|
|||
;; SPDX-License-Identifier: GPL-3.0-only
|
||||
;; SPDX-FileCopyrightText: Copyright (C) 2022 by sterni
|
||||
;; SPDX-FileCopyrightText: Copyright (C) 2022-2023 by sterni
|
||||
;; SPDX-FileCopyrightText: Copyright (C) 2006-2010 by Walter C. Pelissero
|
||||
|
||||
(in-package :mblog)
|
||||
|
|
@ -26,12 +26,10 @@
|
|||
:if-does-not-exist :create)
|
||||
,@body))
|
||||
|
||||
(defvar *copy-buffer-size* 4096)
|
||||
|
||||
(defun redirect-stream (in out)
|
||||
"Consume input stream IN and write all its content to output stream OUT.
|
||||
The streams' element types need to match."
|
||||
(let ((buf (make-array *copy-buffer-size* :element-type (stream-element-type in))))
|
||||
(let ((buf (make-array config:*general-buffer-size* :element-type (stream-element-type in))))
|
||||
(loop for pos = (read-sequence buf in)
|
||||
while (> pos 0)
|
||||
do (write-sequence buf out :end pos))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue