Skip to main content

Fast async logger with Python bindings

Project description

NexusLog

License Python Version

High-performance async logging library, compatible with Python standard logging API.

中文文档

Benchmark

Benchmark chart

Benchmarking with 1,000,000 log messages

------------------------------------------------------------
Logger               Time (s)     Msgs/sec        Log size    
------------------------------------------------------------
Python logging       5.237        190,954         82,888,890 bytes
loguru               7.039        142,070         89,888,890 bytes
picologging          1.999        500,306         79,888,882 bytes
spdlog               0.298        3,358,706       79,888,890 bytes
NexusLogger          0.131        7,654,750       97,888,890 bytes
NexusLogger unix_ts  0.127        7,874,086       82,888,890 bytes
------------------------------------------------------------

NexusLogger is 40.09x faster than Python logging
NexusLogger is 53.88x faster than loguru
NexusLogger is 15.30x faster than picologging
NexusLogger is 2.28x faster than spdlog
NexusLogger unix_ts is 41.24x faster than Python logging
NexusLogger unix_ts is 55.42x faster than loguru
NexusLogger unix_ts is 15.74x faster than picologging
NexusLogger unix_ts is 2.34x faster than spdlog

Installation

pip install nexuslog

Quick Start

import nexuslog as logging

logging.basicConfig(level=logging.INFO)

logging.info("Hello, world!")
logging.warning("This is a warning")
logging.error("This is an error")

API

Log Levels

logging.TRACE
logging.DEBUG
logging.INFO
logging.WARNING
logging.ERROR

Module-level Functions

logging.basicConfig(filename=None, level=logging.INFO, unix_ts=False)
logging.basicConfig(
    level=logging.INFO,
    name_levels={"db": logging.DEBUG, "http.client": logging.WARNING},
)
logging.trace(message)
logging.debug(message)
logging.info(message)
logging.warning(message)
logging.error(message)

Logger Class

from nexuslog import Logger, Level

logger = Logger("myapp", path="/var/log/app", level=Level.Info)
logger.info("message")
logger.shutdown()

getLogger

import nexuslog as logging

logging.basicConfig(filename="/var/log/app.log", level=logging.DEBUG)
logger = logging.getLogger("myapp")
logger.info("message")

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexuslog-0.4.4.tar.gz (109.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nexuslog-0.4.4-cp313-cp313-win_amd64.whl (219.7 kB view details)

Uploaded CPython 3.13Windows x86-64

nexuslog-0.4.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (395.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

nexuslog-0.4.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (394.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

nexuslog-0.4.4-cp313-cp313-macosx_11_0_arm64.whl (352.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nexuslog-0.4.4-cp313-cp313-macosx_10_12_x86_64.whl (357.5 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

nexuslog-0.4.4-cp312-cp312-win_amd64.whl (219.9 kB view details)

Uploaded CPython 3.12Windows x86-64

nexuslog-0.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (395.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

nexuslog-0.4.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (395.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

nexuslog-0.4.4-cp312-cp312-macosx_11_0_arm64.whl (353.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

nexuslog-0.4.4-cp312-cp312-macosx_10_12_x86_64.whl (357.9 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

nexuslog-0.4.4-cp311-cp311-win_amd64.whl (221.5 kB view details)

Uploaded CPython 3.11Windows x86-64

nexuslog-0.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (397.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

nexuslog-0.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (396.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

nexuslog-0.4.4-cp311-cp311-macosx_11_0_arm64.whl (354.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

nexuslog-0.4.4-cp311-cp311-macosx_10_12_x86_64.whl (359.2 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

File details

Details for the file nexuslog-0.4.4.tar.gz.

File metadata

  • Download URL: nexuslog-0.4.4.tar.gz
  • Upload date:
  • Size: 109.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nexuslog-0.4.4.tar.gz
Algorithm Hash digest
SHA256 ae1c0dea7136854ee047c8b6dbb0ed5614cec2e1cc01a93dbfbd48eaffa4fee4
MD5 8a3314763ca4aa204f7d9e204e4bbc0a
BLAKE2b-256 16273bfddded05502d2f899eaeadeb9abaccb28a5948793c409d52dd362ff960

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: nexuslog-0.4.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 219.7 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nexuslog-0.4.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 513d38469f94d20647687234e73b596c2cd62254987736578d31cd1e2d96ffbb
MD5 5133731010bf58582d37719ec0807909
BLAKE2b-256 5ec076f3cd423eafe0ae7f1e6bcff73b46a8a7f59a7f5fc7839b2e9363b4d915

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5bee89f3aa3fc380469fde74db4c151c8b2d72e759ecf01254f8bd8bc66a4615
MD5 d4976c8b41df3f9db48bd2de4c114b4a
BLAKE2b-256 1527266f81539e93b00bdded47eedf1f55300960b80d9e7a2b28bc3ebf71a7ef

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 571fe755006835893b428e56a46dfc44e4633426ee578ba8d6f48bd9f22f0233
MD5 a38227fe08350af643cb762f1741d519
BLAKE2b-256 bac1659a113a2ad2859660024e2b07f1c9bf83fd3ca9237b3258821f166adfaa

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e20a3ae9e54c15d97e4f542c64fdb6285fc46a3a6dd0b0a676d3202c212288ec
MD5 3d91f30120e2ddaa6e85fee68972a055
BLAKE2b-256 99ab727686285d2526e731dbdea99bedbc886c83bd99aae7f3f542b98ac95006

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 49a5f76b8a92a99882efb459e334e3b214e58e74c33cbe869aeb0285be1549ca
MD5 efdc8464bd8e8b6e231fa969d51558af
BLAKE2b-256 33df2abf8ef3eb4705c69191b03c62e0a28f6641857c3a10c9c5d1d420e5b588

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: nexuslog-0.4.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 219.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nexuslog-0.4.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 34919791a2f938c51847c01ace5fd083500d2b3a23bcbf7a2a8aec6dd9da9645
MD5 433edc355f84a1e3d3e40a9efcc0d99e
BLAKE2b-256 7e74ac46b9ce7ee5af7d1412aa48bbda4a82615212d2b2d75d97c5fe4ffa12c7

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5a061d8858f51c9dd2c17b440723fff9c6e686cc5e31f097f15e4af4b8015d0d
MD5 0b9db88b2adda7b0027e51b05cdf1262
BLAKE2b-256 4c659e401cb786623d1ae22fb719b233ea1fb9a99e623739dd80e54d9366f70d

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c4748c47f23202285f1203dbfb2efa9b03d9ec725bc14ba462adc8661aac4648
MD5 77661a60208bf6fa6565cfad0b1fe4ca
BLAKE2b-256 ce0bb66d062d7230d10145bdbdb31adf8ce75365c6e2c4c21519f11caede0815

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 369e5889342d933271e080ca6a6902cae1c48334f049c3e8cc68b39aa47db9c7
MD5 0e168b19004b6b8401e9b2cb64062674
BLAKE2b-256 f67c3172f9058c84729db0dcf973952e8bbe7a5451cd53f25c1930f2483550f8

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f487c2443705809a06b6b769e6820335c916adc3f2daef1751ec37b9c6028c67
MD5 f2aae9a2f7b954f5e4c6d388ee7f7f11
BLAKE2b-256 611f23975faba16f2ced75ac266941a8fc98663f8ca368a9f99156f5910fd703

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: nexuslog-0.4.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 221.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nexuslog-0.4.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a4d42e186dc15d2330b4ed8fde3d66eba002553f8a738e5a03eea5ddca21f504
MD5 6ebfffe68d0b6a70050933403603509d
BLAKE2b-256 5a1d7ae018be97b241d384ea5c5d697699718926674ecea8e03b534108e07056

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a70aa8648e4272016ab1e911ad94510c62287ab60a0e96f13aec9bb0b330ffb
MD5 c2e310d1ab89b68e7764ffa8ba336bc9
BLAKE2b-256 0913d75a7b90ca383fec9d86e455ba18c68c3b393c8bacb782f45fcd7a3ec90f

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ff3819d23693e634fa04126909017a7a24f8eb1c6829a66b88b65d4a68e1061d
MD5 721f325bb44e179c00d2fdf486c878ea
BLAKE2b-256 973e0501219a546e83056e0dc69cdf725dc2defc43d2b91e33b5741075a3c0f1

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f1d0c59bdfa27efa339dd6be03b78cc69523583d52bc45f2512ef8db3da764dc
MD5 6e3bc36a53fa13db4199c320298996d2
BLAKE2b-256 f1c6c5da9f48f6ce2e127eed9066531af7a598dd6fc2a1bf7551d117394f75db

See more details on using hashes here.

File details

Details for the file nexuslog-0.4.4-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nexuslog-0.4.4-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5d0ac6b6c523ba3d739441f3448921373321fb3117737668c62b191c9a1465da
MD5 5155e9c7646fe8bbcd0ce5db2befcea6
BLAKE2b-256 af63123316d841856b5dfe5def6392d634e1c88f10beb8a940c0d68edf41c4f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page