https://github.com/julialogging/zmqloggers.jl
A julia logger that logs to a ZMQ socket
https://github.com/julialogging/zmqloggers.jl
Last synced: 6 months ago
JSON representation
A julia logger that logs to a ZMQ socket
- Host: GitHub
- URL: https://github.com/julialogging/zmqloggers.jl
- Owner: JuliaLogging
- License: mit
- Created: 2025-06-10T15:23:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-15T12:30:38.000Z (about 1 year ago)
- Last Synced: 2025-08-20T15:47:14.719Z (11 months ago)
- Language: Julia
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZMQLoggers
[](https://github.com/JuliaLogging/LoggingZMQ.jl/actions/workflows/Test.yml?query=branch%3Amain)
[](https://codecov.io/gh/JuliaLogging/LoggingZMQ.jl)
[](https://github.com/JuliaBesties/BestieTemplate.jl)
This package provides a logger that writes its output to a ZMQ socket.
The logger is **not** thread safe because ZMQ sockets are not thread safe.
## Usage
```julia
import Logging
using ZMQLoggers
using ZMQ
ctx = Context()
addr = "inproc://logger"
receiver = Socket(ctx, SUB)
subscribe(receiver, "")
bind(receiver, addr)
logsock = Socket(ctx, PUB)
connect(logsock, addr)
logger = ZMQLogger(logsock, Logging.Info)
Logging.with_logger(logger) do
@info "This is a test"
end
println(recv(receiver, String)) # This is a test
```