log-foundry 0.10.2.dev63__tar.gz → 0.10.2.dev65__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/PKG-INFO +21 -13
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/README.md +20 -12
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/pyproject.toml +1 -1
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/LICENSE +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/__init__.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/_diag.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/_fork.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/_lifecycle.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/api.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/config.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/console.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/context.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/decorator.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/ids.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/model.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/py.typed +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/results.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sanitize.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/__init__.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/_batch.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/_chunk.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/_retry.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/_socket.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/_time.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/base.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/callback.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/clickhouse.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/datadog.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/elasticsearch.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/eventhubs.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/file.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/filtering.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/firehose.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/honeycomb.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/http.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/kafka.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/kinesis.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/logging_sink.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/logstash.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/loki.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/memory.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/mongodb.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/multi.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/nats.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/newrelic.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/null.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/postgres.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/pubsub.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/rabbitmq.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/redis.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/sentry.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/sns.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/splunk.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/sqlite.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/sqs.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/stdout.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/syslog.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/transform.py +0 -0
- {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/worker.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: log-foundry
|
|
3
|
-
Version: 0.10.2.
|
|
3
|
+
Version: 0.10.2.dev65
|
|
4
4
|
Summary: Generate logs for your console and JSON events for downstream consumption.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -527,18 +527,26 @@ A few conventions hold across every sink below:
|
|
|
527
527
|
open for you to manage.
|
|
528
528
|
- **Forking.** A forked child repairs the library automatically — it rebuilds the worker so it keeps
|
|
529
529
|
delivering, re-initialises every lock (without which the child's *first* log call can deadlock),
|
|
530
|
-
and
|
|
531
|
-
do is give the child a sink of its own: the child inherits the same object, so
|
|
532
|
-
SQLite handle or one file is now written by two processes
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
530
|
+
and re-opens any buffered stream it inherited so the parent's pending bytes are not written twice.
|
|
531
|
+
What it does **not** do is give the child a sink of its own: the child inherits the same object, so
|
|
532
|
+
one socket, one SQLite handle or one file is now written by two processes. It will generally not
|
|
533
|
+
be *closed* by both — the library records which process it was handed each sink in, and a child
|
|
534
|
+
refuses to close one it inherited — but a shared connection is still a shared connection, and
|
|
535
|
+
there are two exceptions below.
|
|
536
|
+
**Under gunicorn, uWSGI or Celery, build a connection-holding sink in the worker process:**
|
|
537
|
+
`configure()` from gunicorn's `post_fork` hook rather than under preload, and don't log from the
|
|
538
|
+
master. Reconfiguring in the child is harmless **for a sink the library was handed in this
|
|
539
|
+
process** — but if the master *built* a connection sink and never called `configure()` with it,
|
|
540
|
+
a child that then does is the first process to hand it over, so it owns it and closes it at exit.
|
|
541
|
+
That is the one case the record cannot decide, and it is the case this advice avoids. A master
|
|
542
|
+
that must log should use a
|
|
543
|
+
sink whose `close()` costs nothing to share, such as `StdoutSink` or `FileSink`. A sink you wrote
|
|
544
|
+
yourself is repaired only if it subclasses `Sink` or a shipped sink; one that satisfies the
|
|
545
|
+
protocol structurally is outside the repair, along with any third-party client's own locks and
|
|
546
|
+
buffers. The second exception: if you subclass a shipped sink **and add a transport of your
|
|
547
|
+
own**, override `reacquire_after_fork()` — inheriting it claims the whole object on the strength
|
|
548
|
+
of re-opening only the part the parent class knows about, after which the child *will* close
|
|
549
|
+
your connection.
|
|
542
550
|
- **Never crashes the app.** A broken destination degrades logging and nothing more. A sink that
|
|
543
551
|
delivered *part* of a batch counts what it lost (`.failed`, `.dropped_oversized`,
|
|
544
552
|
`.dropped_unadjudicated`, …) and returns, since retrying would re-deliver what already landed.
|
|
@@ -491,18 +491,26 @@ A few conventions hold across every sink below:
|
|
|
491
491
|
open for you to manage.
|
|
492
492
|
- **Forking.** A forked child repairs the library automatically — it rebuilds the worker so it keeps
|
|
493
493
|
delivering, re-initialises every lock (without which the child's *first* log call can deadlock),
|
|
494
|
-
and
|
|
495
|
-
do is give the child a sink of its own: the child inherits the same object, so
|
|
496
|
-
SQLite handle or one file is now written by two processes
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
494
|
+
and re-opens any buffered stream it inherited so the parent's pending bytes are not written twice.
|
|
495
|
+
What it does **not** do is give the child a sink of its own: the child inherits the same object, so
|
|
496
|
+
one socket, one SQLite handle or one file is now written by two processes. It will generally not
|
|
497
|
+
be *closed* by both — the library records which process it was handed each sink in, and a child
|
|
498
|
+
refuses to close one it inherited — but a shared connection is still a shared connection, and
|
|
499
|
+
there are two exceptions below.
|
|
500
|
+
**Under gunicorn, uWSGI or Celery, build a connection-holding sink in the worker process:**
|
|
501
|
+
`configure()` from gunicorn's `post_fork` hook rather than under preload, and don't log from the
|
|
502
|
+
master. Reconfiguring in the child is harmless **for a sink the library was handed in this
|
|
503
|
+
process** — but if the master *built* a connection sink and never called `configure()` with it,
|
|
504
|
+
a child that then does is the first process to hand it over, so it owns it and closes it at exit.
|
|
505
|
+
That is the one case the record cannot decide, and it is the case this advice avoids. A master
|
|
506
|
+
that must log should use a
|
|
507
|
+
sink whose `close()` costs nothing to share, such as `StdoutSink` or `FileSink`. A sink you wrote
|
|
508
|
+
yourself is repaired only if it subclasses `Sink` or a shipped sink; one that satisfies the
|
|
509
|
+
protocol structurally is outside the repair, along with any third-party client's own locks and
|
|
510
|
+
buffers. The second exception: if you subclass a shipped sink **and add a transport of your
|
|
511
|
+
own**, override `reacquire_after_fork()` — inheriting it claims the whole object on the strength
|
|
512
|
+
of re-opening only the part the parent class knows about, after which the child *will* close
|
|
513
|
+
your connection.
|
|
506
514
|
- **Never crashes the app.** A broken destination degrades logging and nothing more. A sink that
|
|
507
515
|
delivered *part* of a batch counts what it lost (`.failed`, `.dropped_oversized`,
|
|
508
516
|
`.dropped_unadjudicated`, …) and returns, since retrying would re-deliver what already landed.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev65}/src/log_foundry/sinks/elasticsearch.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|