NexusLog
High-performance async logging library, compatible with Python standard logging API.
Benchmark
Benchmarking with 1,000,000 log messages
------------------------------------------------------------
Logger Time (s) Msgs/sec Log size
------------------------------------------------------------
loguru 7.675 130,297 89,888,890 bytes
Python logging 5.313 188,206 82,888,890 bytes
picologging 2.038 490,626 79,888,888 bytes
spdlog 0.199 5,034,527 79,888,890 bytes
NexusLogger 0.049 20,304,036 97,888,890 bytes
NexusLogger unix_ts 0.049 20,451,884 83,868,922 bytes
------------------------------------------------------------
NexusLogger is 4.03x faster than spdlog
NexusLogger is 41.38x faster than picologging
NexusLogger is 107.88x faster than Python logging
NexusLogger is 155.83x faster than loguru
NexusLogger unix_ts is 4.06x faster than spdlog
NexusLogger unix_ts is 41.69x faster than picologging
NexusLogger unix_ts is 108.67x faster than Python logging
NexusLogger unix_ts is 156.96x faster than loguru
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, color="auto")
logging.basicConfig(
level=logging.INFO,
name_levels={"db": logging.DEBUG, "http.client": logging.WARNING},
)
logging.trace(message, *args)
logging.debug(message, *args)
logging.info(message, *args)
logging.warning(message, *args)
logging.error(message, *args)
Lazy %-style Formatting
Like the standard logging module, extra arguments are merged into the
message with %-style formatting — but only if the log level is enabled.
When the level is disabled, the arguments are never formatted (no
str()/repr() calls), making disabled log calls nearly free:
logger.info("price=%s qty=%s side=%s", price, qty, side)
logger.debug("state=%r retries=%d", state, retries) # zero cost at INFO level
Supported conversions: %s %r %d %i %f %e %g %x %o %%,
plus the full % operator spec (width, precision, flags, %(name)s with a
dict argument) with semantics identical to Python's message % args. Simple
placeholders are rendered natively in Rust — formatting with args is faster
than building the message with an f-string at the call site. A message
logged without args is emitted verbatim, so literal % needs no escaping.
Colored Output
logging.basicConfig(color="auto") # default
The color option controls ANSI colorization of the level value (by
severity) and the logfmt keys (dimmed):
"auto"(default) — color only when writing to a color-capable terminal. File and piped output stay plain. Honors theNO_COLOR(force off) andFORCE_COLOR(force on) environment variables;NO_COLORwins."off"— never emit ANSI color."always"— always emit ANSI color, even to files and pipes.
Colors: error red, warn yellow, info green, debug cyan, trace dim.
The message body is never colored. There is no cost on the hot path when
color is inactive.
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexuslog_lib-0.8.0.tar.gz.
File metadata
- Download URL: nexuslog_lib-0.8.0.tar.gz
- Upload date:
- Size: 171.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3595376e7b98a0da4c96e8678af849148ff06a2c2eddc46ad60a03bcf09e59c8
|
|
| MD5 |
a067c6540c099be105675ee91a43dc57
|
|
| BLAKE2b-256 |
9899e0c52ac1a96c2539e51973c64f1e0a325c1bb458691fcb47e73f6acb4183
|
File details
Details for the file nexuslog_lib-0.8.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 230.2 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30aeddfd8a6e489ceb4acd98ead128f39d02e4c42b49240fb35dad03b21c3c76
|
|
| MD5 |
f279264be5a4e1b9e1409bbce20f0048
|
|
| BLAKE2b-256 |
0af44bd3a616b842e4475ee561c67bf6f46bc47eaad39ff563c36c7b9daad374
|
File details
Details for the file nexuslog_lib-0.8.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 364.0 kB
- Tags: CPython 3.14, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f797554e164f0b8b8d02c876d71ad0f29b2d182aaa6202cfedbc78f378a02dda
|
|
| MD5 |
51e40efc7c3d0c2611269d65c1a1aa7b
|
|
| BLAKE2b-256 |
56f4b27abd0e671d047c737a607a4a8dcc4d656caaec3551706523af4026b8bf
|
File details
Details for the file nexuslog_lib-0.8.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 363.0 kB
- Tags: CPython 3.14, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
249c9f2c6f71b2012eb495c5e2f687e09dd9fd6e998ef75d4d40bb90654b3fa9
|
|
| MD5 |
46864d9621259e2ff1aa8bf2242ce593
|
|
| BLAKE2b-256 |
0f07e1231eba9f15e594b998e9f1db588e4fb001fda71859d9230e01c6c02839
|
File details
Details for the file nexuslog_lib-0.8.0-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 330.3 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ed9b4d22773e49eb00d0168fe1ab9af1d85b58f6faa9e8f15f7bda0aafe5578
|
|
| MD5 |
da7cee0846975a5eb0ca6c188407a2c2
|
|
| BLAKE2b-256 |
0aaef0ad3ccc98e4a33d764a09367aa162d11a7d3b2ac99c264fc5b5c6e876be
|
File details
Details for the file nexuslog_lib-0.8.0-cp314-cp314-macosx_10_12_x86_64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp314-cp314-macosx_10_12_x86_64.whl
- Upload date:
- Size: 339.7 kB
- Tags: CPython 3.14, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
880d6efb29b38f3b07ad2aeb74ea725fe4b6389285149ed97e0ead31d4eb41b2
|
|
| MD5 |
ba14a433caf678cbfa67bcc72cd6a6f2
|
|
| BLAKE2b-256 |
b97fcc2db77bfcd8e5644ed4911a4b0a4f5834221cd408fecdfa408a56d499e3
|
File details
Details for the file nexuslog_lib-0.8.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 230.0 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
999685a418d71cab157e3ef277c3fdaca87c3d7957ab917aef395502123d9882
|
|
| MD5 |
9cbd24c871234d2e05a477794173a126
|
|
| BLAKE2b-256 |
b9dae778b687a64a7f8e9ff24a5e93b210d6d1ac01c449b1d1b89000b0cba3a1
|
File details
Details for the file nexuslog_lib-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 364.3 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9824270e9b5765f18c5e15343514ab68a8ee6ce7687321eb0a77331457346ec6
|
|
| MD5 |
7d7f3738fd468ab43478a37f5e572e0f
|
|
| BLAKE2b-256 |
d39ba28f50fd377f5ecd5c59cae6b3de34a16c866dea003c88a2e7be5467e7ed
|
File details
Details for the file nexuslog_lib-0.8.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 362.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14c17491098fecefc2a4c7e6d8790504cc7fc531fc907363f2e310d349f4a151
|
|
| MD5 |
0e131af78ae4bf2527b470dd1cd351f8
|
|
| BLAKE2b-256 |
175e848702f2fa95becd11713c9c14866d564d4afe13d9f063c38f7af09d6d8e
|
File details
Details for the file nexuslog_lib-0.8.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 330.2 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea490d4ee4ee7440398c4efa8580a9fc08285293a9f92602141ee23543afdda8
|
|
| MD5 |
69b74686a891023e901808c8029f645b
|
|
| BLAKE2b-256 |
0c79ea22b5310ae292024f2d0ba4555e94b7dd62832ca6a65185204cbeac3825
|
File details
Details for the file nexuslog_lib-0.8.0-cp313-cp313-macosx_10_12_x86_64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp313-cp313-macosx_10_12_x86_64.whl
- Upload date:
- Size: 339.9 kB
- Tags: CPython 3.13, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29bc62d9fba2138a02f1f3328455166d0fc706ffea3af0006b697a8c4308da3
|
|
| MD5 |
1282ba68d16c3252838ed26314cb0c96
|
|
| BLAKE2b-256 |
ff124ffa4236690617c1f32e012ee57effc2f207929c35efa6b893e4637e7e42
|
File details
Details for the file nexuslog_lib-0.8.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 230.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10ad7861a2f65316f89153f8099ebbf04a95b1a75752710c730c7d3bd54ce0eb
|
|
| MD5 |
30f85016313d7cc3792e8cc933edaf8a
|
|
| BLAKE2b-256 |
3d4e098606469686da9c3a537206adfaef6fb7fb0e6dea70800065a96be29475
|
File details
Details for the file nexuslog_lib-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 364.8 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
789cddc948519bbaec26dcbaab3ab2d66ef28bd525fa510ab49f47c0a2a096e5
|
|
| MD5 |
97dd8b4023a8e81267a49edddd79287c
|
|
| BLAKE2b-256 |
1a7fbb61fd15c42fa125ccd990e1038d53f600c7ff0285367a55dfd2825a422b
|
File details
Details for the file nexuslog_lib-0.8.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 363.3 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fffa21185698fac624a5dec0d90b4be19706c907a68bf5602ba5970f10ebe21
|
|
| MD5 |
c7db3305f6bd6a99ad8fad086865230b
|
|
| BLAKE2b-256 |
c10886ebd76e4e70c325e0da6b70a90405c85ae97d70417f961b26efc38fa030
|
File details
Details for the file nexuslog_lib-0.8.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 330.5 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b724d9fdcd422326953dff843efce9ca60177f81f9dde50845b10b998fa89b8f
|
|
| MD5 |
394511e0f3ead63978856258f0f2bbdb
|
|
| BLAKE2b-256 |
cfaa893c2c7f39bb269e5b2b55a5fdc34d0bfd37734245301a089c1027a72d3c
|
File details
Details for the file nexuslog_lib-0.8.0-cp312-cp312-macosx_10_12_x86_64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 340.3 kB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed0e39cc32edc62241d39ab4ac21a677a2777d6dfc7d92c33cd89c49a3e82bb6
|
|
| MD5 |
55c04afd25f028308299c6c984dba93f
|
|
| BLAKE2b-256 |
45f40903f30082dc3af05710522b3e1307716e853b2b109b2dad2eb9e68260ca
|
File details
Details for the file nexuslog_lib-0.8.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 231.8 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1172ab6fbd3dd1c5e586f561d0e6855e2fd5c58991c15aa063bcb74b1a3715bf
|
|
| MD5 |
364428e051ca18c59f0cc4ab8d82b5e7
|
|
| BLAKE2b-256 |
4f63385a20ad0bb0b030429e2682f3a41b271fd21c2729f476c24b978208a093
|
File details
Details for the file nexuslog_lib-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 364.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a1e447a77ec6a1b65cffe1717cf405e6d13c332c21660cd7d9d6e90711e384a
|
|
| MD5 |
2fc8fe0561a386132961343743d65670
|
|
| BLAKE2b-256 |
52993be511713b814b29c934ebf184a3b6a341d185447d52697550e0a49c0e59
|
File details
Details for the file nexuslog_lib-0.8.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 363.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76c6b459e42e35cb9dc215ac474b38cc6ba160ec2864f4e605968e0819b95eb3
|
|
| MD5 |
cf864a833bd270868be36b1bb903a7d8
|
|
| BLAKE2b-256 |
fde1574f48c5b860f408a77d1a54f278827b095a30bd3bb3b8b6c83d9148a674
|
File details
Details for the file nexuslog_lib-0.8.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 330.0 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05c0edcb8732de046283ff7558cfe69ee19f3076980923dcba6d6d5a76e8c861
|
|
| MD5 |
39e909d588795ab0cabaae5e7ef16c77
|
|
| BLAKE2b-256 |
db2476bd2177102bded7b5535db8db797b93b8cbce2be852b65d350f1dc71455
|
File details
Details for the file nexuslog_lib-0.8.0-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: nexuslog_lib-0.8.0-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 339.9 kB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
979e6cb8e3d603eb39e8353c280b8db30bb5fe8088043016ee91cdbbd0d39e11
|
|
| MD5 |
ec1ceba64c50269a84523b2159ff8970
|
|
| BLAKE2b-256 |
7492abdcee93688b6174d79e27eabfd3db0821b45a9b56816e1b0699dcee72e1
|