https://github.com/tkf/consoleprogressmonitor.jl
https://github.com/tkf/consoleprogressmonitor.jl
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tkf/consoleprogressmonitor.jl
- Owner: tkf
- License: mit
- Created: 2019-10-16T03:24:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-09T22:18:06.000Z (over 5 years ago)
- Last Synced: 2025-06-15T12:05:26.546Z (7 months ago)
- Language: Julia
- Size: 17.6 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ConsoleProgressMonitor.jl: A ProgressMeter.jl-Logging.jl bridge
[](https://travis-ci.com/tkf/ConsoleProgressMonitor.jl)
[](https://codecov.io/gh/tkf/ConsoleProgressMonitor.jl)
[](https://coveralls.io/github/tkf/ConsoleProgressMonitor.jl?branch=master)
**NOTE:**
[TerminalLoggers.jl](https://github.com/c42f/TerminalLoggers.jl)
supersedes this package. Please use TerminalLoggers.jl.
## Usage
### Setup
```julia
julia> using ConsoleProgressMonitor
julia> ConsoleProgressMonitor.install_logger();
```
Alternatively, use `ConsoleProgressMonitor.with_progresslogger` to
temporary enable `ConsoleProgressMonitor`.
### Print progress meter
Any logging events that are compatible with
[`Juno.progress`](http://docs.junolab.org/latest/man/juno_frontend/#Progress-Meters-1)
specification are displayed using `ProgressMeter.Progress`.
```julia
julia> using Logging: @logmsg, LogLevel
julia> let id = gensym(:id)
for i = 1:10
sleep(0.1)
@logmsg LogLevel(-1) "iterating" progress=i/10 _id=id
end
@logmsg LogLevel(-1) "iterating" progress="done" _id=id
end
```