All Projects → jruere → Multiprocessing Logging

jruere / Multiprocessing Logging

Licence: lgpl-3.0
Handler for logging from multiple processes

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Multiprocessing Logging

distex
Distributed process pool for Python
Stars: ✭ 101 (-63.54%)
Mutual labels:  multiprocessing
good-influx
InfluxDB broadcasting for Good process monitor
Stars: ✭ 15 (-94.58%)
Mutual labels:  logging
Easyloggingpp
Single header C++ logging library. It is extremely powerful, extendable, light-weight, fast performing, thread and type safe and consists of many built-in features. It provides ability to write logs in your own customized format. It also provide support for logging your classes, third-party libraries, STL and third-party containers etc.
Stars: ✭ 3,032 (+994.58%)
Mutual labels:  logging
simple-task-queue
asynchronous task queues using python's multiprocessing library
Stars: ✭ 39 (-85.92%)
Mutual labels:  multiprocessing
Naos
A mildly opiniated modern cloud service architecture blueprint + reference implementation
Stars: ✭ 19 (-93.14%)
Mutual labels:  logging
Rz Go
Ripzap - Fast and 0 allocs leveled JSON logger for Go ⚡️. Dependency free.
Stars: ✭ 256 (-7.58%)
Mutual labels:  logging
FinanceCenter
Fetching Financial Data (US/China)
Stars: ✭ 26 (-90.61%)
Mutual labels:  multiprocessing
Log
📗 Simple, configurable and scalable Structured Logging for Go.
Stars: ✭ 276 (-0.36%)
Mutual labels:  logging
logging
Generic file logger for .NET Core (FileLoggerProvider) with minimal dependencies
Stars: ✭ 109 (-60.65%)
Mutual labels:  logging
Pygogo
A Python logging library with superpowers
Stars: ✭ 265 (-4.33%)
Mutual labels:  logging
gxlog
A concise, functional, flexible and extensible logger for go.
Stars: ✭ 65 (-76.53%)
Mutual labels:  logging
thundra-agent-nodejs
Thundra Lambda Node.js Agent
Stars: ✭ 31 (-88.81%)
Mutual labels:  logging
Pypette
Ridiculously simple flow controller for building complex pipelines
Stars: ✭ 258 (-6.86%)
Mutual labels:  multiprocessing
endurox-go
Application Server for Go (ASG)
Stars: ✭ 32 (-88.45%)
Mutual labels:  multiprocessing
Sysmon Config
Sysmon configuration file template with default high-quality event tracing
Stars: ✭ 3,287 (+1086.64%)
Mutual labels:  logging
parallel mAP evaluation
This repo parallelizes mAP_evaluation using python's multiprocessing module.
Stars: ✭ 18 (-93.5%)
Mutual labels:  multiprocessing
Hangfire.JobsLogger
A Hangfire extension to store a log during job execution.
Stars: ✭ 21 (-92.42%)
Mutual labels:  logging
Pebble
Multi threading and processing eye-candy.
Stars: ✭ 276 (-0.36%)
Mutual labels:  multiprocessing
Stern
⎈ Multi pod and container log tailing for Kubernetes -- Friendly fork of https://github.com/wercker/stern
Stars: ✭ 268 (-3.25%)
Mutual labels:  logging
Home
Project Glimpse: Node Edition - Spend less time debugging and more time developing.
Stars: ✭ 260 (-6.14%)
Mutual labels:  logging

multiprocessing-logging

Run Status Coverage Badge Supported Python versions License

When using the multiprocessing module, logging becomes less useful since sub-processes should log to individual files/streams or there's the risk of records becoming garbled.

This simple module implements a Handler that when set on the root Logger will handle tunneling the records to the main process so that they are handled correctly.

It's currently tested in Linux and Python 2.7 & 3.5+.

Pypy3 hangs on the tests so I don't recommend using it.

Pypy appears to be working, recently.

Only works on POSIX systems and only Linux is supported. It does not work on Windows.

Origin

This library was taken verbatim from a StackOverflow post and extracted into a module so that I wouldn't have to copy the code in every project.

Later, several improvements have been contributed.

Usage

Before you start logging but after you configure the logging framework (maybe with logging.basicConfig(...)), do the following:

import multiprocessing_logging

multiprocessing_logging.install_mp_handler()

and that's it.

With multiprocessing.Pool

When using a Pool, make sure install_mp_handler is called before the Pool is instantiated, for example:

import logging
from multiprocessing import Pool
from multiprocessing_logging import install_mp_handler

logging.basicConfig(...)
install_mp_handler()
pool = Pool(...)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].