A unified Logger and ProgressBar util with zero dependencies.
Repo ModelCloud/LogBar, read from GitHub 13 h ago. ModelCloud has not joined Take My Repo.
ModelCloud/LogBar is a public repo on GitHub by ModelCloud. A unified Logger and ProgressBar util with zero dependencies. It declares the Apache-2.0 license on GitHub. It is written mainly in Python, has 10 stars and last changed on 2026-11-14. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-25.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
A unified logger, table renderer, and progress bar utility with zero runtime dependencies.
βΌ glyph prefixes on interactive ANSI terminals.once helpers prevent duplicate log spam automatically.LOGBAR_ANIMATION=0 to disable the highlight animation (applies to stacked, region, and spinner bars).LOGBAR_PROGRESS_OUTPUT_INTERVAL=10 to render every 10 logical updates instead of every update (applies to all progress bar types including spinners and split-pane region bars).fit sizing.pip install logbar
LogBar works out-of-the-box with CPython 3.8+ on Linux, macOS, and Windows terminals.
On an interactive ANSI terminal, LogBar uses a compact βΌ prefix by default.
The glyph is colored by level: cyan for DEBUG, green for INFO, yellow for
WARN, and red for ERROR and CRIT. This keeps tables aligned while still
making severity visible at a glance.
| Level | README visual key | Terminal glyph color |
|---|---|---|
DEBUG |
π΅ βΌ |
cyan |
INFO |
π’ βΌ |
green |
WARN |
π‘ βΌ |
yellow |
ERROR / CRIT |
π΄ βΌ |
red |
The colored circle is a README-only visual key; the adjacent βΌ is the exact
glyph LogBar emits. GitHub repository Markdown cannot apply terminal ANSI
colors directly to text, so the rendered color is visible in the emoji key.
DEBUG \x1b[36mβΌ\x1b[0m
INFO \x1b[32mβΌ\x1b[0m
WARN \x1b[33mβΌ\x1b[0m
ERROR \x1b[31mβΌ\x1b[0m
CRIT \x1b[31mβΌ\x1b[0m
When output is redirected, headless, or color-disabled, LogBar automatically
falls back to text prefixes such as INFO, WARN, and ERROR. Disable glyphs
for a logger with log.set_symbol_prefix(False), or set
LOGBAR_DISABLE_SYMBOL_PREFIX=1 before creating the logger. To explicitly use
glyphs on a redirected stream, set both LOGBAR_FORCE_ANSI=1 and
LOGBAR_FORCE_SYMBOL_PREFIX=1.
LogBar keeps progress bars, spinners, tables, and normal log lines readable in the same terminal session. Compared with traditional loggers, it lets long-running CLI programs show live status without flooding the screen with repeated status lines or breaking the flow of regular logs.
Main rendering APIs:
log.pb(...) for live progress barslog.spinner(...) for work with no fixed totallog.columns(...) for aligned table outputExamples:
from logbar import LogBar
log = LogBar.shared()
for _ in log.pb(range(5)).title("δΈθ½½ π¦").subtitle("phase 1"):
pass
jobs = ["scan", "parse", "index", "flush"]
pb = log.pb(jobs, output_interval=1).title("Indexing").manual()
for job in pb:
log.info("processing %s", job)
pb.subtitle(job).draw()
cols = log.columns(
{"label": "task", "width": "fit"},
{"label": "status", "width": "fit"},
{"label": "detail", "width": "50%"},
)
cols.info.header()
cols.info("render", "active", "width and alignment stay terminal-aware")
Experimental split-screen sessions:
from logbar import RegionScreenSession, rows
with RegionScreenSession.columns("left", rows("right_top", "right_bottom")) as ui:
left = ui.create_logger("left", supports_ansi=False)
right_top = ui.create_logger("right_top", supports_ansi=False)
right_bottom = ui.create_logger("right_bottom", supports_ansi=False)
left.setLevel("INFO")
right_top.setLevel("INFO")
right_bottom.setLevel("INFO")
left.info("download queue ready")
right_top.info("worker online")
right_bottom.set_footer_lines(["gpu warmup", "epoch 1/8"])
Plain-text sketch (this example explicitly disables ANSI in the pane loggers):
+----------------------+----------------------+
| INFO download ... | INFO worker online |
| |----------------------|
| | gpu warmup |
| | epoch 1/8 |
+----------------------+----------------------+
Forked workers are safe: LogBar reinitialises its render locks and stdout
drain thread in the child, so a multiprocessing fork pool can log with
PYTHONUNBUFFERED=1 instead of blocking on a thread it never inherited. See
fork safety for the os.register_at_fork flow and the
bounded flush wait.
import time
from logbar import LogBar
log = LogBar.shared()
log.info("hello from logbar")
log.info.once("this line shows once")
log.info.once("this line shows once") # silently skipped
for _ in log.pb(range(5)):
time.sleep(0.2)
Sample output after stripping ANSI color codes from an interactive terminal:
βΌ hello from logbar
βΌ this line shows once
The shared instance exposes the standard level helpers plus once variants:
log.debug("details...")
log.warn("disk space is low")
log.error("cannot connect to database")
log.critical.once("fuse blown, shutting down")
Set a minimum output threshold per logger instance:
log.setLevel("WARN") # accepts DEBUG/INFO/WARN/ERROR/CRIT strings
log.setLevel("ERROR")
log.setLevel(LogBar.WARNING) # alias to logging.WARNING
Typical mixed-level output after stripping ANSI color codes:
βΌ model version=v2.9.1 # DEBUG, cyan
βΌ disk space is low (5%) # WARN, yellow
βΌ cannot connect to database # ERROR, red
βΌ fuse blown, shutting down # CRIT, red
Use log.set_symbol_prefix(False) when the level names should remain visible
in every output mode:
log.set_symbol_prefix(False)
log.info("text prefix enabled") # INFO text prefix enabled
Progress bars accept any iterable or integer total:
for item in log.pb(tasks):
process(item)
for _ in log.pb(500).title("Downloading"):
time.sleep(0.05)
When a workload updates progress very frequently, throttle redraw churn globally or per bar:
for _ in log.pb(500, output_interval=10).title("Quantizing"):
time.sleep(0.01)
output_interval=10 means LogBar will emit a fresh snapshot after roughly every 10 logical progress steps, while still forcing the last pending step to render before the bar closes. Set LOGBAR_PROGRESS_OUTPUT_INTERVAL=10 to apply the same default process-wide. This default is now honored by stacked progress bars, pane-local region bars, and rolling spinners.
When LogBar detects a headless/CI/AI-agent environment (e.g. CI, DEVIN_*, CODEX_*, Jupyter, or TERM=dumb), it suppresses visual progress-bar output and short-circuits the title/subtitle/draw pipeline. This makes frequent progress updates in long batch loops cheap without flooding logs.
Manual mode gives full control when you need to interleave logging and redraws:
pb = log.pb(jobs).title("Processing").manual()
for job in pb:
log.info(f"starting {job}")
pb.subtitle(f"in-flight: {job}").draw()
run(job)
log.info(f"finished {job}")
Progress bar snapshot (the live progress row has no log-level prefix):
Downloading [2 of 5] βββββββββββββββββββββββββββββββββββββββ| 0:00:00 / 0:00:00 [2/5] 40.0%
The bar always re-renders at the bottom, so log lines never overwrite your progress.
For code already using tqdm, LogBar exposes a drop-in replacement that
does not require the tqdm package:
from logbar import tqdm, trange, logging_redirect_tqdm
for item in tqdm(items, desc="training"):
process(item)
for i in trange(100):
step(i)
with logging_redirect_tqdm():
log.info("this is safe to call inside a tqdm loop")
tqdm supports iterable and manual total= modes, desc, set_description,
set_postfix, update, n, format_dict, and tqdm.write. The underlying
implementation is backed by LogBar's ProgressBar, so it behaves the same way
in interactive and headless/CI environments.
When the total work is unknown, log.spinner() provides a rolling indicator that redraws every 500β―ms until closed:
with log.spinner("Loading model") as spinner:
load_weights()
spinner.subtitle("warming up")
warm_up()
The rolling bar animates automatically while attached. Close it explicitly with spinner.close() if you are not using the context manager. Set LOGBAR_ANIMATION=0 to disable the title highlight sweep on progress labels. You can also set LOGBAR_PROGRESS_OUTPUT_INTERVAL=10 to throttle the spinner's phase updates, which is helpful when many spinners are running in headless or CI environments.
LogBar keeps each progress bar on its own line and restacks them whenever they redraw. Later bars always appear closest to the live log output.
pb_fetch = log.pb(range(80)).title("Fetch").manual()
pb_train = log.pb(range(120)).title("Train").manual()
for _ in pb_fetch:
pb_fetch.draw()
time.sleep(0.01)
for _ in pb_train:
pb_train.draw()
time.sleep(0.01)
pb_train.close()
pb_fetch.close()
Sample stacked output (plain-text view):
Fetch [12 of 20] βββββββββββββββββββββββββββββββββββ| 0:00:00 / 0:00:00 [12/20] 60.0%
Train [7 of 20] βββββββββββββββββββββββββββββββββββββ| 0:00:00 / 0:00:00 [7/20] 35.0%
Pick from bundled palettes or create your own blocks and colors:
pb = log.pb(250)
pb.style('sunset') # bundled gradients: emerald_glow, sunset, ocean, matrix, mono
pb.fill('β', empty='Β·') # override glyphs
pb.colors(fill=['#ff9500', '#ff2d55'], head='mint') # custom palette, optional head accent
pb.colors(empty='slate') # tint the empty track
pb.head('>', color='82') # custom head glyph + color index
ProgressBar.available_styles() lists builtin styles, and you can register additional ones with ProgressBar.register_style(...) or switch defaults globally via ProgressBar.set_default_style(...). Custom colors accept ANSI escape codes, 256-color indexes (e.g. '82'), or hex strings ('#4c1d95').
For direct style registration and introspection, import the advanced style APIs from logbar.progress:
from logbar.progress import ProgressBar, ProgressStyle, progress_style_names
print(ProgressBar.available_styles())
print(progress_style_names())
ProgressBar.register_style(
ProgressStyle(
name="ice",
fill_char="β ",
empty_char="Β·",
fill_colors=("#7dd3fc", "#38bdf8"),
gradient=True,
head_char=">",
)
)
ProgressBar.set_default_style("ice")
Styled output (plain-text view with ANSI removed):
Upload [12 of 20] ββββββββββββββββΒ·Β·Β·Β·Β·Β·Β·Β·Β·Β·Β·| 0:01:48 / 0:02:52 [12/20] 62.0%
Use log.columns(...) to format aligned tables while logging data streams. Print the column header per context with cols.info.header() (or cols.warn.header(), etc.). Columns support spans and three width hints:
"24""30%""fit"cols = log.columns(
{"label": "tag", "width": "fit"},
{"label": "duration", "width": 8},
{"label": "message", "width": "50%"}
)
cols.info.header()
cols.info("startup", "1.2s", "ready")
cols.info("alignment", "0.5s", "resizing")
Sample table output (plain-text):
βΌ +---------------------------+--------+-----------------------------------+
βΌ | tag |duration|message |
βΌ +---------------------------+--------+-----------------------------------+
βΌ | startup |1.2s |ready |
βΌ +---------------------------+--------+-----------------------------------+
βΌ | alignment |0.5s |resizing |
βΌ +---------------------------+--------+-----------------------------------+
Notice how the tag column expands precisely to the longest value thanks to width="fit".
You can update column definitions at runtime:
cols.update({
"message": {"width": "40%"},
"duration": {"label": "time"}
})
Useful column helpers:
cols.info.header() or cols.info.headers() prints the current border + header block.cols.info.simulate(...) recomputes widths without emitting a row.cols.update(...) changes labels, spans, or widths at runtime.cols.width() returns the current rendered table width, including borders.cols.widths, cols.padding, and cols.column_specs expose the current layout.tqdmThe API mirrors common tqdm patterns while staying more Pythonic:
# tqdm
for n in tqdm.tqdm(range(1000)):
consume(n)
# logbar
for n in log.pb(range(1000)):
consume(n)
Manual update comparison:
ModelCloud/LogBar is a public repo on GitHub by ModelCloud. A unified Logger and ProgressBar util with zero dependencies.
It declares the Apache-2.0 license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-11-14. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run LogBar. What is known comes from GitHub. It declares the Apache-2.0 license on GitHub. Its last change was on 2026-11-14. It has 10 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.