pyfastlogging 0.8.0__tar.gz → 0.9.0__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.
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/Cargo.lock +160 -22
- pyfastlogging-0.9.0/PKG-INFO +123 -0
- {pyfastlogging-0.8.0/pyfastlogging → pyfastlogging-0.9.0}/README.md +24 -0
- pyfastlogging-0.9.0/examples/otel.py +26 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/Cargo.toml +8 -2
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/README.md +31 -0
- pyfastlogging-0.9.0/fastlogging/examples/otel.rs +32 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/config/file.rs +13 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/config/instance.rs +3 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/def.rs +29 -2
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/error.rs +6 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/lib.rs +6 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/logging.rs +21 -0
- pyfastlogging-0.9.0/fastlogging/src/otel.rs +426 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/Cargo.toml +3 -3
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0/pyfastlogging}/README.md +24 -0
- pyfastlogging-0.9.0/pyfastlogging/examples/otel.py +26 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0/pyfastlogging}/src/def.rs +21 -1
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0/pyfastlogging}/src/lib.rs +2 -1
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0/pyfastlogging}/src/root.rs +3 -1
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0/pyfastlogging}/src/writer.rs +50 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyproject.toml +8 -1
- {pyfastlogging-0.8.0/pyfastlogging → pyfastlogging-0.9.0}/src/def.rs +21 -1
- {pyfastlogging-0.8.0/pyfastlogging → pyfastlogging-0.9.0}/src/lib.rs +2 -1
- {pyfastlogging-0.8.0/pyfastlogging → pyfastlogging-0.9.0}/src/root.rs +3 -1
- {pyfastlogging-0.8.0/pyfastlogging → pyfastlogging-0.9.0}/src/writer.rs +50 -0
- pyfastlogging-0.8.0/PKG-INFO +0 -25
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/Cargo.toml +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/callback.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/console.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/console_add_writer.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/console_default.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/console_mp.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/file.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/fork.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/net_unencrypted_one_client.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/pool.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/pool_spawn.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/root_file.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/spawn.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/syslog.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/examples/threads.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/benches/benchmarks.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/doc/README.md +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/callback.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/console.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/console_add_writer.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/console_static.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/default.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/default_logger.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/eventlog.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/ext_config.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/file.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/file_add_writer.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/fork.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/get_server_addresses_ports.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/get_server_configs.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/init.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/net_unencrypted_one_client.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/spawn.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/syslog.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/threads.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/examples/write_config_file.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/callback.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/config/common.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/config/mod.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/console.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/eventlog.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/file.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/logger.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/net/client.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/net/def.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/net/encryption.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/net/mod.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/net/server.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/root.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/syslog.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/unix.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/src/windows.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/fastlogging/tests/integration.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/benches/benchmark.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/callback.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/console.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/console_add_writer.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/console_default.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/console_mp.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/file.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/fork.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/net_unencrypted_one_client.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/pool.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/pool_spawn.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/root_file.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/spawn.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/syslog.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/examples/threads.py +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/src/error.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/src/logger.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/pyfastlogging/src/logging.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/src/error.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/src/logger.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/src/logging.rs +0 -0
- {pyfastlogging-0.8.0 → pyfastlogging-0.9.0}/tests/test_integration.py +0 -0
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
# It is not intended for manual editing.
|
|
3
3
|
version = 4
|
|
4
4
|
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "adler2"
|
|
7
|
+
version = "2.0.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
|
10
|
+
|
|
5
11
|
[[package]]
|
|
6
12
|
name = "aho-corasick"
|
|
7
13
|
version = "1.1.5"
|
|
@@ -91,6 +97,12 @@ version = "1.5.1"
|
|
|
91
97
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
92
98
|
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
93
99
|
|
|
100
|
+
[[package]]
|
|
101
|
+
name = "base64"
|
|
102
|
+
version = "0.23.1"
|
|
103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
104
|
+
checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
|
|
105
|
+
|
|
94
106
|
[[package]]
|
|
95
107
|
name = "bitflags"
|
|
96
108
|
version = "2.13.2"
|
|
@@ -166,7 +178,7 @@ dependencies = [
|
|
|
166
178
|
|
|
167
179
|
[[package]]
|
|
168
180
|
name = "cfastlogging"
|
|
169
|
-
version = "0.
|
|
181
|
+
version = "0.9.0"
|
|
170
182
|
dependencies = [
|
|
171
183
|
"fastlogging",
|
|
172
184
|
"once_cell",
|
|
@@ -176,9 +188,9 @@ dependencies = [
|
|
|
176
188
|
|
|
177
189
|
[[package]]
|
|
178
190
|
name = "cfg-if"
|
|
179
|
-
version = "1.0.
|
|
191
|
+
version = "1.0.5"
|
|
180
192
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
181
|
-
checksum = "
|
|
193
|
+
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
|
182
194
|
|
|
183
195
|
[[package]]
|
|
184
196
|
name = "chacha20"
|
|
@@ -436,7 +448,7 @@ dependencies = [
|
|
|
436
448
|
"proc-macro2",
|
|
437
449
|
"quote",
|
|
438
450
|
"scratch",
|
|
439
|
-
"syn 3.0.
|
|
451
|
+
"syn 3.0.6",
|
|
440
452
|
]
|
|
441
453
|
|
|
442
454
|
[[package]]
|
|
@@ -450,7 +462,7 @@ dependencies = [
|
|
|
450
462
|
"indexmap",
|
|
451
463
|
"proc-macro2",
|
|
452
464
|
"quote",
|
|
453
|
-
"syn 3.0.
|
|
465
|
+
"syn 3.0.6",
|
|
454
466
|
]
|
|
455
467
|
|
|
456
468
|
[[package]]
|
|
@@ -468,12 +480,12 @@ dependencies = [
|
|
|
468
480
|
"indexmap",
|
|
469
481
|
"proc-macro2",
|
|
470
482
|
"quote",
|
|
471
|
-
"syn 3.0.
|
|
483
|
+
"syn 3.0.6",
|
|
472
484
|
]
|
|
473
485
|
|
|
474
486
|
[[package]]
|
|
475
487
|
name = "cxxfastlogging"
|
|
476
|
-
version = "0.
|
|
488
|
+
version = "0.9.0"
|
|
477
489
|
dependencies = [
|
|
478
490
|
"cxx",
|
|
479
491
|
"cxx-build",
|
|
@@ -546,7 +558,7 @@ dependencies = [
|
|
|
546
558
|
|
|
547
559
|
[[package]]
|
|
548
560
|
name = "fastlogging"
|
|
549
|
-
version = "0.
|
|
561
|
+
version = "0.9.0"
|
|
550
562
|
dependencies = [
|
|
551
563
|
"chrono",
|
|
552
564
|
"criterion",
|
|
@@ -572,6 +584,7 @@ dependencies = [
|
|
|
572
584
|
"thiserror 2.0.20",
|
|
573
585
|
"thread-id",
|
|
574
586
|
"threadpool",
|
|
587
|
+
"ureq",
|
|
575
588
|
"windows-sys 0.61.2",
|
|
576
589
|
"zip",
|
|
577
590
|
]
|
|
@@ -597,6 +610,8 @@ version = "1.1.10"
|
|
|
597
610
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
598
611
|
checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb"
|
|
599
612
|
dependencies = [
|
|
613
|
+
"crc32fast",
|
|
614
|
+
"miniz_oxide",
|
|
600
615
|
"zlib-rs",
|
|
601
616
|
]
|
|
602
617
|
|
|
@@ -742,6 +757,22 @@ dependencies = [
|
|
|
742
757
|
"windows-link",
|
|
743
758
|
]
|
|
744
759
|
|
|
760
|
+
[[package]]
|
|
761
|
+
name = "http"
|
|
762
|
+
version = "1.5.0"
|
|
763
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
764
|
+
checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0"
|
|
765
|
+
dependencies = [
|
|
766
|
+
"bytes",
|
|
767
|
+
"itoa",
|
|
768
|
+
]
|
|
769
|
+
|
|
770
|
+
[[package]]
|
|
771
|
+
name = "httparse"
|
|
772
|
+
version = "1.10.1"
|
|
773
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
774
|
+
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
775
|
+
|
|
745
776
|
[[package]]
|
|
746
777
|
name = "hybrid-array"
|
|
747
778
|
version = "0.4.15"
|
|
@@ -808,7 +839,7 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
808
839
|
|
|
809
840
|
[[package]]
|
|
810
841
|
name = "jfastlogging-ffm"
|
|
811
|
-
version = "0.
|
|
842
|
+
version = "0.9.0"
|
|
812
843
|
dependencies = [
|
|
813
844
|
"cbindgen",
|
|
814
845
|
"fastlogging",
|
|
@@ -818,7 +849,7 @@ dependencies = [
|
|
|
818
849
|
|
|
819
850
|
[[package]]
|
|
820
851
|
name = "jfastlogging-jni"
|
|
821
|
-
version = "0.
|
|
852
|
+
version = "0.9.0"
|
|
822
853
|
dependencies = [
|
|
823
854
|
"fastlogging",
|
|
824
855
|
"jni",
|
|
@@ -947,6 +978,16 @@ version = "2.8.3"
|
|
|
947
978
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
948
979
|
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
949
980
|
|
|
981
|
+
[[package]]
|
|
982
|
+
name = "miniz_oxide"
|
|
983
|
+
version = "0.9.1"
|
|
984
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
985
|
+
checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c"
|
|
986
|
+
dependencies = [
|
|
987
|
+
"adler2",
|
|
988
|
+
"simd-adler32",
|
|
989
|
+
]
|
|
990
|
+
|
|
950
991
|
[[package]]
|
|
951
992
|
name = "num-conv"
|
|
952
993
|
version = "0.2.2"
|
|
@@ -1032,6 +1073,12 @@ dependencies = [
|
|
|
1032
1073
|
"windows-link",
|
|
1033
1074
|
]
|
|
1034
1075
|
|
|
1076
|
+
[[package]]
|
|
1077
|
+
name = "percent-encoding"
|
|
1078
|
+
version = "2.3.2"
|
|
1079
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1080
|
+
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
|
1081
|
+
|
|
1035
1082
|
[[package]]
|
|
1036
1083
|
name = "pin-project-lite"
|
|
1037
1084
|
version = "0.2.17"
|
|
@@ -1095,7 +1142,7 @@ dependencies = [
|
|
|
1095
1142
|
|
|
1096
1143
|
[[package]]
|
|
1097
1144
|
name = "pyfastlogging"
|
|
1098
|
-
version = "0.
|
|
1145
|
+
version = "0.9.0"
|
|
1099
1146
|
dependencies = [
|
|
1100
1147
|
"fastlogging",
|
|
1101
1148
|
"once_cell",
|
|
@@ -1285,9 +1332,9 @@ dependencies = [
|
|
|
1285
1332
|
|
|
1286
1333
|
[[package]]
|
|
1287
1334
|
name = "rustix"
|
|
1288
|
-
version = "1.1.
|
|
1335
|
+
version = "1.1.5"
|
|
1289
1336
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1290
|
-
checksum = "
|
|
1337
|
+
checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
|
|
1291
1338
|
dependencies = [
|
|
1292
1339
|
"bitflags",
|
|
1293
1340
|
"errno",
|
|
@@ -1296,6 +1343,41 @@ dependencies = [
|
|
|
1296
1343
|
"windows-sys 0.61.2",
|
|
1297
1344
|
]
|
|
1298
1345
|
|
|
1346
|
+
[[package]]
|
|
1347
|
+
name = "rustls"
|
|
1348
|
+
version = "0.23.45"
|
|
1349
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1350
|
+
checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634"
|
|
1351
|
+
dependencies = [
|
|
1352
|
+
"log",
|
|
1353
|
+
"once_cell",
|
|
1354
|
+
"ring",
|
|
1355
|
+
"rustls-pki-types",
|
|
1356
|
+
"rustls-webpki",
|
|
1357
|
+
"subtle",
|
|
1358
|
+
"zeroize",
|
|
1359
|
+
]
|
|
1360
|
+
|
|
1361
|
+
[[package]]
|
|
1362
|
+
name = "rustls-pki-types"
|
|
1363
|
+
version = "1.15.1"
|
|
1364
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1365
|
+
checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96"
|
|
1366
|
+
dependencies = [
|
|
1367
|
+
"zeroize",
|
|
1368
|
+
]
|
|
1369
|
+
|
|
1370
|
+
[[package]]
|
|
1371
|
+
name = "rustls-webpki"
|
|
1372
|
+
version = "0.103.15"
|
|
1373
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1374
|
+
checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"
|
|
1375
|
+
dependencies = [
|
|
1376
|
+
"ring",
|
|
1377
|
+
"rustls-pki-types",
|
|
1378
|
+
"untrusted",
|
|
1379
|
+
]
|
|
1380
|
+
|
|
1299
1381
|
[[package]]
|
|
1300
1382
|
name = "rustversion"
|
|
1301
1383
|
version = "1.0.23"
|
|
@@ -1362,7 +1444,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
|
1362
1444
|
dependencies = [
|
|
1363
1445
|
"proc-macro2",
|
|
1364
1446
|
"quote",
|
|
1365
|
-
"syn 3.0.
|
|
1447
|
+
"syn 3.0.6",
|
|
1366
1448
|
]
|
|
1367
1449
|
|
|
1368
1450
|
[[package]]
|
|
@@ -1477,6 +1559,12 @@ version = "0.11.1"
|
|
|
1477
1559
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1478
1560
|
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
1479
1561
|
|
|
1562
|
+
[[package]]
|
|
1563
|
+
name = "subtle"
|
|
1564
|
+
version = "2.6.1"
|
|
1565
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1566
|
+
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|
1567
|
+
|
|
1480
1568
|
[[package]]
|
|
1481
1569
|
name = "syn"
|
|
1482
1570
|
version = "2.0.119"
|
|
@@ -1490,9 +1578,9 @@ dependencies = [
|
|
|
1490
1578
|
|
|
1491
1579
|
[[package]]
|
|
1492
1580
|
name = "syn"
|
|
1493
|
-
version = "3.0.
|
|
1581
|
+
version = "3.0.6"
|
|
1494
1582
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1495
|
-
checksum = "
|
|
1583
|
+
checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
|
|
1496
1584
|
dependencies = [
|
|
1497
1585
|
"proc-macro2",
|
|
1498
1586
|
"quote",
|
|
@@ -1576,7 +1664,7 @@ checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
|
|
|
1576
1664
|
dependencies = [
|
|
1577
1665
|
"proc-macro2",
|
|
1578
1666
|
"quote",
|
|
1579
|
-
"syn 3.0.
|
|
1667
|
+
"syn 3.0.6",
|
|
1580
1668
|
]
|
|
1581
1669
|
|
|
1582
1670
|
[[package]]
|
|
@@ -1693,9 +1781,9 @@ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
|
1693
1781
|
|
|
1694
1782
|
[[package]]
|
|
1695
1783
|
name = "unicode-ident"
|
|
1696
|
-
version = "1.0.
|
|
1784
|
+
version = "1.0.26"
|
|
1697
1785
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1698
|
-
checksum = "
|
|
1786
|
+
checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
|
|
1699
1787
|
|
|
1700
1788
|
[[package]]
|
|
1701
1789
|
name = "unicode-width"
|
|
@@ -1715,6 +1803,41 @@ version = "0.9.0"
|
|
|
1715
1803
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1716
1804
|
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
|
1717
1805
|
|
|
1806
|
+
[[package]]
|
|
1807
|
+
name = "ureq"
|
|
1808
|
+
version = "3.4.2"
|
|
1809
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1810
|
+
checksum = "9a7ac20be9b7726e0bbdbf974c059676d9acb1cd414961f570a4e8231cacd7fc"
|
|
1811
|
+
dependencies = [
|
|
1812
|
+
"base64",
|
|
1813
|
+
"flate2",
|
|
1814
|
+
"log",
|
|
1815
|
+
"percent-encoding",
|
|
1816
|
+
"rustls",
|
|
1817
|
+
"rustls-pki-types",
|
|
1818
|
+
"ureq-proto",
|
|
1819
|
+
"utf8-zero",
|
|
1820
|
+
"webpki-roots",
|
|
1821
|
+
]
|
|
1822
|
+
|
|
1823
|
+
[[package]]
|
|
1824
|
+
name = "ureq-proto"
|
|
1825
|
+
version = "0.6.4"
|
|
1826
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1827
|
+
checksum = "f86fd172ccca569e458f61b6bdd6220965a9ef36e672a6852953b51a0e1583be"
|
|
1828
|
+
dependencies = [
|
|
1829
|
+
"base64",
|
|
1830
|
+
"http",
|
|
1831
|
+
"httparse",
|
|
1832
|
+
"log",
|
|
1833
|
+
]
|
|
1834
|
+
|
|
1835
|
+
[[package]]
|
|
1836
|
+
name = "utf8-zero"
|
|
1837
|
+
version = "0.8.1"
|
|
1838
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1839
|
+
checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e"
|
|
1840
|
+
|
|
1718
1841
|
[[package]]
|
|
1719
1842
|
name = "utf8parse"
|
|
1720
1843
|
version = "0.2.2"
|
|
@@ -1775,7 +1898,7 @@ dependencies = [
|
|
|
1775
1898
|
"bumpalo",
|
|
1776
1899
|
"proc-macro2",
|
|
1777
1900
|
"quote",
|
|
1778
|
-
"syn 3.0.
|
|
1901
|
+
"syn 3.0.6",
|
|
1779
1902
|
"wasm-bindgen-shared",
|
|
1780
1903
|
]
|
|
1781
1904
|
|
|
@@ -1798,6 +1921,15 @@ dependencies = [
|
|
|
1798
1921
|
"wasm-bindgen",
|
|
1799
1922
|
]
|
|
1800
1923
|
|
|
1924
|
+
[[package]]
|
|
1925
|
+
name = "webpki-roots"
|
|
1926
|
+
version = "1.0.9"
|
|
1927
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1928
|
+
checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a"
|
|
1929
|
+
dependencies = [
|
|
1930
|
+
"rustls-pki-types",
|
|
1931
|
+
]
|
|
1932
|
+
|
|
1801
1933
|
[[package]]
|
|
1802
1934
|
name = "winapi"
|
|
1803
1935
|
version = "0.3.9"
|
|
@@ -2077,6 +2209,12 @@ dependencies = [
|
|
|
2077
2209
|
"syn 2.0.119",
|
|
2078
2210
|
]
|
|
2079
2211
|
|
|
2212
|
+
[[package]]
|
|
2213
|
+
name = "zeroize"
|
|
2214
|
+
version = "1.9.0"
|
|
2215
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2216
|
+
checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e"
|
|
2217
|
+
|
|
2080
2218
|
[[package]]
|
|
2081
2219
|
name = "zip"
|
|
2082
2220
|
version = "8.6.0"
|
|
@@ -2095,9 +2233,9 @@ dependencies = [
|
|
|
2095
2233
|
|
|
2096
2234
|
[[package]]
|
|
2097
2235
|
name = "zlib-rs"
|
|
2098
|
-
version = "0.6.
|
|
2236
|
+
version = "0.6.8"
|
|
2099
2237
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2100
|
-
checksum = "
|
|
2238
|
+
checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
|
|
2101
2239
|
|
|
2102
2240
|
[[package]]
|
|
2103
2241
|
name = "zmij"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyfastlogging
|
|
3
|
+
Version: 0.9.0
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: Programming Language :: Rust
|
|
7
|
+
Classifier: Programming Language :: Python
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Summary: A lightning fast logger, written in Rust, for multiple platforms and languages.
|
|
22
|
+
Author-email: Martin Bammer <mrbm74@gmail.com>
|
|
23
|
+
License-Expression: MIT OR Apache-2.0
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
26
|
+
Project-URL: Documentation, https://github.com/brmmm3/fastlogging-rs#readme
|
|
27
|
+
Project-URL: Homepage, https://github.com/brmmm3/fastlogging-rs
|
|
28
|
+
Project-URL: Issues, https://github.com/brmmm3/fastlogging-rs/issues
|
|
29
|
+
Project-URL: Repository, https://github.com/brmmm3/fastlogging-rs
|
|
30
|
+
|
|
31
|
+
# pyfastlogging
|
|
32
|
+
|
|
33
|
+
Python wrapper for [fastlogging](https://github.com/brmmm3/fastlogging-rs/tree/master/fastlogging).
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- Extremely fast, non-blocking logging (writers run in background threads)
|
|
38
|
+
- Thread-safe logging calls
|
|
39
|
+
- Multiple writers per logger: console (optional colored), file (rotation/compression), network (TCP), syslog, callback
|
|
40
|
+
- Optional AES encryption for network logging
|
|
41
|
+
- Support for multiprocessing (`spawn`) and threads
|
|
42
|
+
- Configuration via API or configuration file (JSON, XML, YAML)
|
|
43
|
+
- Requires Python >= 3.10
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install pyfastlogging
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Quickstart
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
from pyfastlogging import TRACE, Logging, ConsoleWriterConfig
|
|
55
|
+
|
|
56
|
+
logger = Logging(
|
|
57
|
+
TRACE,
|
|
58
|
+
"main",
|
|
59
|
+
[ConsoleWriterConfig(TRACE, True)],
|
|
60
|
+
)
|
|
61
|
+
logger.trace("Trace Message")
|
|
62
|
+
logger.debug("Debug Message")
|
|
63
|
+
logger.info("Info Message")
|
|
64
|
+
logger.shutdown()
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Or with the root logger:
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
import pyfastlogging as fl
|
|
71
|
+
from pyfastlogging import TRACE, ConsoleWriterConfig
|
|
72
|
+
|
|
73
|
+
fl.add_writer(ConsoleWriterConfig(TRACE, True))
|
|
74
|
+
fl.trace("Trace Message")
|
|
75
|
+
fl.debug("Debug Message")
|
|
76
|
+
fl.info("Info Message")
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Building the wheels
|
|
80
|
+
|
|
81
|
+
This is the Python layer for [fastlogging](https://github.com/brmmm3/fastlogging-rs/tree/master/fastlogging). This package is for creating Python wheels.
|
|
82
|
+
For simplicity `build_wheels.py` can be used to build the wheels. The Python script uses `pyenv` to choose different Python versions and `maturin` to build the wheels.
|
|
83
|
+
If you run the script without options it will build the Python module for the current used Python interpreter.
|
|
84
|
+
When using the `--versions` option you can provide:
|
|
85
|
+
|
|
86
|
+
- a comma separated list of Python versions
|
|
87
|
+
- `*` to build Python modules for all versions installed by `pyenv`. Put it in quotation marks to avoid unexpected behavior.
|
|
88
|
+
|
|
89
|
+
**Note:**
|
|
90
|
+
As of now [manylinux](https://github.com/pypa/manylinux) wheels are failing to build with `cibuildwheel`, because the spec for libc 2.34 is still not released.
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
- Class and enum definitions: [doc/DEF.md](doc/DEF.md)
|
|
95
|
+
- Root logger: [doc/ROOT.md](doc/ROOT.md)
|
|
96
|
+
- Logging class: [doc/LOGGING.md](doc/LOGGING.md)
|
|
97
|
+
- Logger class: [doc/LOGGER.md](doc/LOGGER.md)
|
|
98
|
+
- Examples: [examples](examples) and [doc/EXAMPLES.md](doc/EXAMPLES.md)
|
|
99
|
+
|
|
100
|
+
## OpenTelemetry
|
|
101
|
+
|
|
102
|
+
Pass an `OpenTelemetryWriterConfig` to `Logging` to export logs over
|
|
103
|
+
OTLP/HTTP. Records are sent to `{endpoint}/v1/logs`; a local Collector uses
|
|
104
|
+
`http://localhost:4318`.
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from pyfastlogging import Logging, OpenTelemetryWriterConfig, TRACE
|
|
108
|
+
|
|
109
|
+
logger = Logging(
|
|
110
|
+
TRACE,
|
|
111
|
+
"main",
|
|
112
|
+
otel=OpenTelemetryWriterConfig(
|
|
113
|
+
level=TRACE,
|
|
114
|
+
endpoint="http://localhost:4318",
|
|
115
|
+
service_name="my-python-app",
|
|
116
|
+
),
|
|
117
|
+
)
|
|
118
|
+
logger.info("exported to OpenTelemetry")
|
|
119
|
+
logger.shutdown()
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
See [`examples/otel.py`](examples/otel.py) for a complete example.
|
|
123
|
+
|
|
@@ -66,3 +66,27 @@ As of now [manylinux](https://github.com/pypa/manylinux) wheels are failing to b
|
|
|
66
66
|
- Logging class: [doc/LOGGING.md](doc/LOGGING.md)
|
|
67
67
|
- Logger class: [doc/LOGGER.md](doc/LOGGER.md)
|
|
68
68
|
- Examples: [examples](examples) and [doc/EXAMPLES.md](doc/EXAMPLES.md)
|
|
69
|
+
|
|
70
|
+
## OpenTelemetry
|
|
71
|
+
|
|
72
|
+
Pass an `OpenTelemetryWriterConfig` to `Logging` to export logs over
|
|
73
|
+
OTLP/HTTP. Records are sent to `{endpoint}/v1/logs`; a local Collector uses
|
|
74
|
+
`http://localhost:4318`.
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
from pyfastlogging import Logging, OpenTelemetryWriterConfig, TRACE
|
|
78
|
+
|
|
79
|
+
logger = Logging(
|
|
80
|
+
TRACE,
|
|
81
|
+
"main",
|
|
82
|
+
otel=OpenTelemetryWriterConfig(
|
|
83
|
+
level=TRACE,
|
|
84
|
+
endpoint="http://localhost:4318",
|
|
85
|
+
service_name="my-python-app",
|
|
86
|
+
),
|
|
87
|
+
)
|
|
88
|
+
logger.info("exported to OpenTelemetry")
|
|
89
|
+
logger.shutdown()
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
See [`examples/otel.py`](examples/otel.py) for a complete example.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from pyfastlogging import (
|
|
2
|
+
TRACE,
|
|
3
|
+
Logging,
|
|
4
|
+
OpenTelemetryWriterConfig,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
if __name__ == "__main__":
|
|
8
|
+
# Create a logging instance with an OpenTelemetry writer
|
|
9
|
+
# pointing to a local OpenTelemetry Collector.
|
|
10
|
+
logger = Logging(
|
|
11
|
+
TRACE,
|
|
12
|
+
"main",
|
|
13
|
+
otel=OpenTelemetryWriterConfig(
|
|
14
|
+
level=TRACE,
|
|
15
|
+
endpoint="http://localhost:4318",
|
|
16
|
+
service_name="my-python-app",
|
|
17
|
+
),
|
|
18
|
+
)
|
|
19
|
+
logger.trace("Trace Message")
|
|
20
|
+
logger.debug("Debug Message")
|
|
21
|
+
logger.info("Info Message")
|
|
22
|
+
logger.success("Success Message")
|
|
23
|
+
logger.warning("Warning Message")
|
|
24
|
+
logger.error("Error Message")
|
|
25
|
+
logger.fatal("Fatal Message")
|
|
26
|
+
logger.shutdown()
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "fastlogging"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.9.0"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
authors = ["Martin Bammer <mrbm74@gmail.com>"]
|
|
6
6
|
description = "A lightning fast logger, written in Rust, for multiple platforms and languages."
|
|
7
7
|
license = "MIT OR Apache-2.0"
|
|
8
8
|
repository = "https://github.com/brmmm3/fastlogging-rs"
|
|
9
|
-
|
|
9
|
+
documentation = "https://docs.rs/fastlogging-rs"
|
|
10
10
|
keywords = ["logging", "logger"]
|
|
11
|
+
categories = ["development-tools::debugging"]
|
|
11
12
|
include = [
|
|
12
13
|
"Cargo.toml",
|
|
13
14
|
"src/*",
|
|
@@ -48,6 +49,7 @@ serde_derive = { version = "1.0", optional = true }
|
|
|
48
49
|
serde_json = { version = "1.0" }
|
|
49
50
|
serde_yaml = { version = "0.9", optional = true }
|
|
50
51
|
quick-xml = { version = "0.42", features = ["serialize"], optional = true }
|
|
52
|
+
ureq = "3.4"
|
|
51
53
|
|
|
52
54
|
[target.'cfg(unix)'.dependencies]
|
|
53
55
|
syslog = "7.0"
|
|
@@ -81,3 +83,7 @@ default = ["config_json", "config_xml", "config_yaml"]
|
|
|
81
83
|
config_json = ["dep:serde", "dep:serde_derive"]
|
|
82
84
|
config_xml = ["dep:serde", "dep:serde_derive", "dep:quick-xml"]
|
|
83
85
|
config_yaml = ["dep:serde", "dep:serde_derive", "dep:serde_yaml"]
|
|
86
|
+
|
|
87
|
+
[package.metadata.docs.rs]
|
|
88
|
+
all-features = true
|
|
89
|
+
rustdoc-args = ["--cfg", "docsrs"]
|
|
@@ -57,6 +57,37 @@ fn main() -> Result<(), LoggingError> {
|
|
|
57
57
|
}
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
## OpenTelemetry
|
|
61
|
+
|
|
62
|
+
Export logs to an OpenTelemetry Collector over OTLP/HTTP with
|
|
63
|
+
`OpenTelemetryWriterConfig`. The writer posts batches to
|
|
64
|
+
`{endpoint}/v1/logs`; the default endpoint is `http://localhost:4318`.
|
|
65
|
+
|
|
66
|
+
```rust
|
|
67
|
+
use fastlogging::{
|
|
68
|
+
DEBUG, Logging, LoggingError, OpenTelemetryWriterConfig,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
fn main() -> Result<(), LoggingError> {
|
|
72
|
+
let mut log = Logging::new(
|
|
73
|
+
DEBUG,
|
|
74
|
+
"root",
|
|
75
|
+
Some(vec![OpenTelemetryWriterConfig::new(
|
|
76
|
+
DEBUG,
|
|
77
|
+
"http://localhost:4318",
|
|
78
|
+
"my-rust-app",
|
|
79
|
+
).into()]),
|
|
80
|
+
None,
|
|
81
|
+
None,
|
|
82
|
+
)?;
|
|
83
|
+
log.info("exported to OpenTelemetry")?;
|
|
84
|
+
log.shutdown(false)?;
|
|
85
|
+
Ok(())
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
See the complete example in [`examples/otel.rs`](examples/otel.rs).
|
|
90
|
+
|
|
60
91
|
## Architecture
|
|
61
92
|
|
|
62
93
|
Log calls never touch I/O on the caller's thread. Each call performs a level check (the hot path), and if it passes, the message is handed to a flume-backed channel. A single `LoggingThread` running in the background drains that channel and dispatches to each writer's own thread.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
use fastlogging::{
|
|
2
|
+
DEBUG, DEFAULT_OTEL_ENDPOINT, DEFAULT_OTEL_SERVICE_NAME, Logging, LoggingError,
|
|
3
|
+
OpenTelemetryWriterConfig,
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
fn main() -> Result<(), LoggingError> {
|
|
7
|
+
// Create a new logging instance with an OpenTelemetry writer
|
|
8
|
+
// pointing to a local OpenTelemetry Collector.
|
|
9
|
+
let mut logger = Logging::new(
|
|
10
|
+
DEBUG,
|
|
11
|
+
"root",
|
|
12
|
+
Some(vec![
|
|
13
|
+
OpenTelemetryWriterConfig::new(DEBUG, DEFAULT_OTEL_ENDPOINT, DEFAULT_OTEL_SERVICE_NAME)
|
|
14
|
+
.into(),
|
|
15
|
+
]),
|
|
16
|
+
None,
|
|
17
|
+
None,
|
|
18
|
+
)?;
|
|
19
|
+
|
|
20
|
+
// Log messages at various levels — they will be exported to the OTel Collector
|
|
21
|
+
logger.trace("Trace Message")?;
|
|
22
|
+
logger.debug("Debug Message")?;
|
|
23
|
+
logger.info("Info Message")?;
|
|
24
|
+
logger.success("Success Message")?;
|
|
25
|
+
logger.warning("Warning Message")?;
|
|
26
|
+
logger.error("Error Message")?;
|
|
27
|
+
logger.fatal("Fatal Message")?;
|
|
28
|
+
|
|
29
|
+
// Shutdown flushes any remaining buffered log records
|
|
30
|
+
logger.shutdown(false)?;
|
|
31
|
+
Ok(())
|
|
32
|
+
}
|
|
@@ -11,6 +11,7 @@ use crate::WriterEnum;
|
|
|
11
11
|
use crate::WriterTypeEnum;
|
|
12
12
|
use crate::callback::CallbackWriter;
|
|
13
13
|
use crate::level2string;
|
|
14
|
+
use crate::otel::OpenTelemetryWriter;
|
|
14
15
|
use crate::{
|
|
15
16
|
ClientWriter, ConsoleWriter, FileWriter, LevelSyms, LoggingServer, MessageStructEnum, NOTSET,
|
|
16
17
|
SyslogWriter,
|
|
@@ -218,6 +219,7 @@ impl ConfigFile {
|
|
|
218
219
|
WriterEnum::Server(mut logging_server) => logging_server.shutdown()?,
|
|
219
220
|
WriterEnum::Callback(mut callback_writer) => callback_writer.shutdown()?,
|
|
220
221
|
WriterEnum::Syslog(mut syslog_writer) => syslog_writer.shutdown()?,
|
|
222
|
+
WriterEnum::OpenTelemetry(mut otel_writer) => otel_writer.shutdown()?,
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
225
|
} else {
|
|
@@ -315,6 +317,17 @@ impl ConfigFile {
|
|
|
315
317
|
)?)));
|
|
316
318
|
}
|
|
317
319
|
}
|
|
320
|
+
WriterConfigEnum::OpenTelemetry(otel_config) => {
|
|
321
|
+
let configs =
|
|
322
|
+
instance.get_filtered_writer_configs(WriterTypeEnum::OpenTelemetry);
|
|
323
|
+
if merge == FileMerge::MergeReplace {
|
|
324
|
+
instance.remove_writers(Some(configs.into_keys().collect::<Vec<_>>()));
|
|
325
|
+
} else if merge == FileMerge::Merge && configs.is_empty() {
|
|
326
|
+
instance.add_writer(WriterEnum::OpenTelemetry(Box::new(
|
|
327
|
+
OpenTelemetryWriter::new(otel_config.clone(), instance.stop.clone())?,
|
|
328
|
+
)));
|
|
329
|
+
}
|
|
330
|
+
}
|
|
318
331
|
}
|
|
319
332
|
}
|
|
320
333
|
Ok(())
|