log-foundry 0.10.2.dev63__tar.gz → 0.10.2.dev64__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.
Files changed (59) hide show
  1. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/PKG-INFO +21 -13
  2. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/README.md +20 -12
  3. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/pyproject.toml +1 -1
  4. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/LICENSE +0 -0
  5. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/__init__.py +0 -0
  6. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/_diag.py +0 -0
  7. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/_fork.py +0 -0
  8. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/_lifecycle.py +0 -0
  9. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/api.py +0 -0
  10. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/config.py +0 -0
  11. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/console.py +0 -0
  12. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/context.py +0 -0
  13. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/decorator.py +0 -0
  14. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/ids.py +0 -0
  15. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/model.py +0 -0
  16. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/py.typed +0 -0
  17. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/results.py +0 -0
  18. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sanitize.py +0 -0
  19. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/__init__.py +0 -0
  20. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/_batch.py +0 -0
  21. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/_chunk.py +0 -0
  22. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/_retry.py +0 -0
  23. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/_socket.py +0 -0
  24. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/_time.py +0 -0
  25. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/base.py +0 -0
  26. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/callback.py +0 -0
  27. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/clickhouse.py +0 -0
  28. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/datadog.py +0 -0
  29. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/elasticsearch.py +0 -0
  30. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/eventhubs.py +0 -0
  31. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/file.py +0 -0
  32. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/filtering.py +0 -0
  33. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/firehose.py +0 -0
  34. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/honeycomb.py +0 -0
  35. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/http.py +0 -0
  36. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/kafka.py +0 -0
  37. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/kinesis.py +0 -0
  38. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/logging_sink.py +0 -0
  39. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/logstash.py +0 -0
  40. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/loki.py +0 -0
  41. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/memory.py +0 -0
  42. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/mongodb.py +0 -0
  43. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/multi.py +0 -0
  44. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/nats.py +0 -0
  45. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/newrelic.py +0 -0
  46. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/null.py +0 -0
  47. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/postgres.py +0 -0
  48. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/pubsub.py +0 -0
  49. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/rabbitmq.py +0 -0
  50. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/redis.py +0 -0
  51. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/sentry.py +0 -0
  52. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/sns.py +0 -0
  53. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/splunk.py +0 -0
  54. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/sqlite.py +0 -0
  55. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/sqs.py +0 -0
  56. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/stdout.py +0 -0
  57. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/syslog.py +0 -0
  58. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/src/log_foundry/sinks/transform.py +0 -0
  59. {log_foundry-0.10.2.dev63 → log_foundry-0.10.2.dev64}/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.dev63
3
+ Version: 0.10.2.dev64
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 throws away any buffered bytes it inherited so they are not written twice. What it does **not**
531
- do is give the child a sink of its own: the child inherits the same object, so one socket, one
532
- SQLite handle or one file is now written by two processes and *closed* by both, each at its own
533
- exit. That is fine for an append-only file or a queue client and wrong for a connection with
534
- transaction scope, where a close is protocol-visible. **Under gunicorn, uWSGI or Celery, build a
535
- connection-holding sink only in the worker process** — `configure()` from gunicorn's `post_fork`
536
- hook, never under preload, and don't log from the master. Reconfiguring in the child is *not* the
537
- remedy and is worse than the problem: `configure(sink=...)` closes the sink it replaces, which
538
- there is the parent's live connection. A master that must log should use a sink whose `close()`
539
- costs nothing to share, such as `StdoutSink` or `FileSink`. A sink you wrote yourself is repaired
540
- only if it subclasses `Sink` or a shipped sink; one that satisfies the protocol structurally is
541
- outside the repair, along with any third-party client's own locks and buffers.
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 throws away any buffered bytes it inherited so they are not written twice. What it does **not**
495
- do is give the child a sink of its own: the child inherits the same object, so one socket, one
496
- SQLite handle or one file is now written by two processes and *closed* by both, each at its own
497
- exit. That is fine for an append-only file or a queue client and wrong for a connection with
498
- transaction scope, where a close is protocol-visible. **Under gunicorn, uWSGI or Celery, build a
499
- connection-holding sink only in the worker process** — `configure()` from gunicorn's `post_fork`
500
- hook, never under preload, and don't log from the master. Reconfiguring in the child is *not* the
501
- remedy and is worse than the problem: `configure(sink=...)` closes the sink it replaces, which
502
- there is the parent's live connection. A master that must log should use a sink whose `close()`
503
- costs nothing to share, such as `StdoutSink` or `FileSink`. A sink you wrote yourself is repaired
504
- only if it subclasses `Sink` or a shipped sink; one that satisfies the protocol structurally is
505
- outside the repair, along with any third-party client's own locks and buffers.
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.
@@ -20,7 +20,7 @@ dependencies = [
20
20
  ]
21
21
 
22
22
  # Optional features. Install with: pip install log-foundry[aws]
23
- version = "0.10.2.dev63"
23
+ version = "0.10.2.dev64"
24
24
 
25
25
  [project.optional-dependencies]
26
26
  aws = ["boto3>=1.43.61"] # SQSSink, SNSSink, KinesisSink, FirehoseSink