stderrlog-0.5.4/.cargo_vcs_info.json0000644000000001360000000000100130470ustar { "git": { "sha1": "bad4ec66cf891633fb80e883d9cdea5be812f6ca" }, "path_in_vcs": "" }stderrlog-0.5.4/.github/workflows/ci.yml000064400000000000000000000033611046102023000163550ustar 00000000000000name: CI on: pull_request: push: branches: - master env: CARGO_TERM_COLOR: always jobs: test: strategy: matrix: rust: - rust: stable command: test args: "" - rust: 1.36.0 command: check args: "--locked" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ matrix.rust.rust }} override: true - run: mv Cargo.lock.msrv Cargo.lock if: ${{ matrix.rust.rust}} == 1.36.0 - uses: actions-rs/cargo@v1 with: command: ${{ matrix.rust.command }} args: ${{ matrix.rust.args }} fmt-clippy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true components: rustfmt, clippy - uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features coverage: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - uses: actions-rs/tarpaulin@v0.1 with: args: '--ignore-tests' bench: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: nightly override: true - uses: actions-rs/cargo@v1 with: command: bench stderrlog-0.5.4/.github/workflows/rust-clippy.yml000064400000000000000000000031221046102023000202500ustar 00000000000000# This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. # rust-clippy is a tool that runs a bunch of lints to catch common # mistakes in your Rust code and help improve your Rust code. # More details at https://github.com/rust-lang/rust-clippy # and https://rust-lang.github.io/rust-clippy/ name: rust-clippy analyze on: push: branches: [ "master" ] pull_request: # The branches below must be a subset of the branches above branches: [ "master" ] schedule: - cron: '24 14 * * 2' jobs: rust-clippy-analyze: name: Run rust-clippy analyzing runs-on: ubuntu-latest permissions: contents: read security-events: write steps: - name: Checkout code uses: actions/checkout@v2 - name: Install Rust toolchain uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1 with: profile: minimal toolchain: stable components: clippy override: true - name: Install required cargo run: cargo install clippy-sarif sarif-fmt - name: Run rust-clippy run: cargo clippy --all-features --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt continue-on-error: true - name: Upload analysis results to GitHub uses: github/codeql-action/upload-sarif@v1 with: sarif_file: rust-clippy-results.sarif wait-for-processing: true stderrlog-0.5.4/.github/workflows/security-audit.yml000064400000000000000000000004371046102023000207360ustar 00000000000000name: Security audit on: push: paths: - '**/Cargo.toml' - '**/Cargo.lock' jobs: security_audit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions-rs/audit-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} stderrlog-0.5.4/.gitignore000064400000000000000000000000321046102023000136220ustar 00000000000000target Cargo.lock *.rs.bk stderrlog-0.5.4/CHANGELOG.md000064400000000000000000000044441046102023000134560ustar 00000000000000# ChangeLog ## 0.5.3 ### Changed - Moved the timestamps feature behind the enabled-by-default crate feature `timestamps`. ### Fixed - Added missing `show_module_names` field to `StdErrLog` debug implementation. ## 0.5.2 ### Changed - Bumped the minimum Rust version to 1.36.0 * [RUSTSEC-2022-0006](https://rustsec.org/advisories/RUSTSEC-2022-0006.html) fixed This is a semver break but given the age of the Rust versions and changes that have happened in the log crate, we'll do it. - Make it easier to specify debug levels with a number or enum. ## 0.5.1 ### Added - added `.show_module_names()` to include module name in output ## 0.5.0 ### Changed - Bumped minimum Rust version to 1.31.0 * 1.16.0 fails on current version of some deps and some crates.io fetches * Log crate 0.4.11 raised its MSRV to 1.31.0 - Updated and checked minimum version of all deps - Switched to rust edition 2018 - Improved CI testing ## 0.4.3 ### Changed - only check if stderr is a tty for the auto color choice, all other choices pass through without modification - bump termcolor to 1.0 ## 0.4.2 ### Added - add the ability to not show logging levels via `.show_levels()` ### Fixed - auto color choice (the default) will now disable colors if stderr is not connected to a tty by default ## 0.4.1 ### Added - Support millisecond timestamp resolution ## 0.4.0 ### Added - Timestamp now implements FromStr to make arg parsers quicker to implement - Added a StructOpt example to the crate documentation and examples ### Changed - Improved clap example and added Timestamp support - Full use and depend on log 0.4.1. ## 0.3.0 ### Added - a large example under examples to detail how module level logging works ### Changed - bump minimum Rust version to 1.16.0 - allow all log 0.3.x releases - fix situations where including `a::b` also included `a::baz` ## 0.2.4 ### Changed - pinned log to 0.3.8 or older to retain Rust 1.13.0 support ## 0.2.3 ### Added - clap example - support timestamps with microsecond and nanosecond granularity ### Changed - improved performance (https://github.com/cardoe/stderrlog-rs/pull/2) - improved docopt example in README - migrated from time to chrono ### Thanks - Thanks to Zachary Dremann for the performance improvements and the nudge to improve the docs. stderrlog-0.5.4/Cargo.lock0000644000000364620000000000100110350ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 [[package]] name = "android_system_properties" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ "libc", ] [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ "winapi", ] [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", "winapi", ] [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bumpalo" version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "cc" version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574" [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" dependencies = [ "iana-time-zone", "js-sys", "num-integer", "num-traits", "wasm-bindgen", "winapi", ] [[package]] name = "clap" version = "2.33.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826bf7bc84f9435630275cb8e802a4a0ec792b615969934bd16d42ffed10f207" dependencies = [ "ansi_term", "atty", "bitflags", "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", "vec_map", ] [[package]] name = "clap" version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags", "clap_lex", "indexmap", "once_cell", "strsim 0.10.0", "termcolor", "textwrap 0.16.0", ] [[package]] name = "clap_lex" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ "os_str_bytes", ] [[package]] name = "codespan-reporting" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" dependencies = [ "termcolor", "unicode-width", ] [[package]] name = "core-foundation-sys" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cxx" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" dependencies = [ "cc", "cxxbridge-flags", "cxxbridge-macro", "link-cplusplus", ] [[package]] name = "cxx-build" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" dependencies = [ "cc", "codespan-reporting", "once_cell", "proc-macro2", "quote", "scratch", "syn", ] [[package]] name = "cxxbridge-flags" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" [[package]] name = "cxxbridge-macro" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "docopt" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f3f119846c823f9eafcf953a8f6ffb6ed69bf6240883261a7f13b634579a51f" dependencies = [ "lazy_static", "regex", "serde", "strsim 0.10.0", ] [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ "unicode-segmentation", ] [[package]] name = "hermit-abi" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] [[package]] name = "iana-time-zone" version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", "winapi", ] [[package]] name = "iana-time-zone-haiku" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" dependencies = [ "cxx", "cxx-build", ] [[package]] name = "indexmap" version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", "hashbrown", ] [[package]] name = "js-sys" version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" version = "0.2.137" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" [[package]] name = "link-cplusplus" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" dependencies = [ "cc", ] [[package]] name = "log" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] [[package]] name = "num-integer" version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", ] [[package]] name = "num-traits" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] [[package]] name = "once_cell" version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "os_str_bytes" version = "6.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3baf96e39c5359d2eb0dd6ccb42c62b91d9678aa68160d261b9e0ccbf9e9dea9" [[package]] name = "proc-macro-error" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", "syn", "version_check", ] [[package]] name = "proc-macro-error-attr" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", "version_check", ] [[package]] name = "proc-macro2" version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] [[package]] name = "regex" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "regex-syntax", ] [[package]] name = "regex-syntax" version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "scratch" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" [[package]] name = "serde" version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "stderrlog" version = "0.5.4" dependencies = [ "atty", "chrono", "clap 3.2.23", "docopt", "libc", "log", "serde", "structopt", "termcolor", "thread_local", ] [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap 2.33.4", "lazy_static", "structopt-derive", ] [[package]] name = "structopt-derive" version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ "heck", "proc-macro-error", "proc-macro2", "quote", "syn", ] [[package]] name = "syn" version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "termcolor" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ "unicode-width", ] [[package]] name = "textwrap" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thread_local" version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] [[package]] name = "unicode-ident" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "unicode-segmentation" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] name = "unicode-width" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "vec_map" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasm-bindgen" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ "winapi", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" stderrlog-0.5.4/Cargo.lock.msrv000064400000000000000000000673641046102023000145520ustar 00000000000000# This file is automatically @generated by Cargo. # It is not intended for manual editing. [[package]] name = "android_system_properties" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.137 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hermit-abi 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.137 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bumpalo" version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cc" version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iana-time-zone 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.60 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.45 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clap" version = "2.33.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clap" version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "clap_lex 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clap_lex" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "os_str_bytes 6.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "codespan-reporting" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "termcolor 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cxx" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.74 (registry+https://github.com/rust-lang/crates.io-index)", "cxxbridge-flags 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "cxxbridge-macro 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "link-cplusplus 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cxx-build" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.74 (registry+https://github.com/rust-lang/crates.io-index)", "codespan-reporting 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "scratch 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cxxbridge-flags" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cxxbridge-macro" version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "docopt" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.147 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "heck" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-segmentation 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "hermit-abi" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.137 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "iana-time-zone" version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "android_system_properties 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", "iana-time-zone-haiku 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.60 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "iana-time-zone-haiku" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cxx 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", "cxx-build 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "indexmap" version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "js-sys" version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "wasm-bindgen 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" version = "0.2.137" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "link-cplusplus" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "once_cell" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "os_str_bytes" version = "6.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "proc-macro-error" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro-error-attr 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro-error-attr" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro2" version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-ident 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quote" version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "regex-syntax 0.6.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "scratch" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "serde_derive 1.0.147 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "stderrlog" version = "0.5.4-alpha.0" dependencies = [ "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)", "clap 3.2.23 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.137 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.147 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.3.26 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "structopt" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "clap 2.33.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "structopt-derive 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "structopt-derive" version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "heck 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-error 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "syn" version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-ident 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "termcolor" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "textwrap" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-width 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "textwrap" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "thread_local" version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "once_cell 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-ident" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-segmentation" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-width" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "vec_map" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "wasm-bindgen" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-macro 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bumpalo 3.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-shared 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-macro-support 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-backend 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-shared 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum android_system_properties 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" "checksum bitflags 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" "checksum bumpalo 3.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" "checksum cc 1.0.74 (registry+https://github.com/rust-lang/crates.io-index)" = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574" "checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" "checksum chrono 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)" = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" "checksum clap 2.33.4 (registry+https://github.com/rust-lang/crates.io-index)" = "826bf7bc84f9435630275cb8e802a4a0ec792b615969934bd16d42ffed10f207" "checksum clap 3.2.23 (registry+https://github.com/rust-lang/crates.io-index)" = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" "checksum clap_lex 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" "checksum codespan-reporting 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" "checksum core-foundation-sys 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" "checksum cxx 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" "checksum cxx-build 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" "checksum cxxbridge-flags 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" "checksum cxxbridge-macro 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" "checksum docopt 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7f3f119846c823f9eafcf953a8f6ffb6ed69bf6240883261a7f13b634579a51f" "checksum hashbrown 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" "checksum heck 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" "checksum hermit-abi 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" "checksum iana-time-zone 0.1.53 (registry+https://github.com/rust-lang/crates.io-index)" = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" "checksum iana-time-zone-haiku 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" "checksum indexmap 1.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" "checksum js-sys 0.3.60 (registry+https://github.com/rust-lang/crates.io-index)" = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.137 (registry+https://github.com/rust-lang/crates.io-index)" = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" "checksum link-cplusplus 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" "checksum log 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" "checksum num-integer 0.1.45 (registry+https://github.com/rust-lang/crates.io-index)" = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" "checksum num-traits 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" "checksum once_cell 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" "checksum os_str_bytes 6.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3baf96e39c5359d2eb0dd6ccb42c62b91d9678aa68160d261b9e0ccbf9e9dea9" "checksum proc-macro-error 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" "checksum proc-macro-error-attr 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" "checksum proc-macro2 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" "checksum quote 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" "checksum regex 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" "checksum regex-syntax 0.6.27 (registry+https://github.com/rust-lang/crates.io-index)" = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" "checksum scratch 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" "checksum serde 1.0.147 (registry+https://github.com/rust-lang/crates.io-index)" = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" "checksum serde_derive 1.0.147 (registry+https://github.com/rust-lang/crates.io-index)" = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" "checksum strsim 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum structopt 0.3.26 (registry+https://github.com/rust-lang/crates.io-index)" = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" "checksum structopt-derive 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" "checksum syn 1.0.103 (registry+https://github.com/rust-lang/crates.io-index)" = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" "checksum termcolor 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum textwrap 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" "checksum thread_local 1.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" "checksum unicode-ident 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" "checksum unicode-segmentation 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" "checksum unicode-width 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" "checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" "checksum version_check 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" "checksum wasm-bindgen 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)" = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" "checksum wasm-bindgen-backend 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" "checksum wasm-bindgen-macro 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)" = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" "checksum wasm-bindgen-macro-support 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)" = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" "checksum wasm-bindgen-shared 0.2.83 (registry+https://github.com/rust-lang/crates.io-index)" = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" "checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" stderrlog-0.5.4/Cargo.toml0000644000000037250000000000100110540ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "stderrlog" version = "0.5.4" authors = ["Doug Goldstein "] description = "Logger that logs to stderr based on verbosity specified" homepage = "https://github.com/cardoe/stderrlog-rs" documentation = "https://docs.rs/stderrlog/" readme = "README.md" keywords = [ "log", "loglevel", "logging", "stderr", "stderrlog", ] categories = ["development-tools::debugging"] license = "MIT OR Apache-2.0" repository = "https://github.com/cardoe/stderrlog-rs" [dependencies.atty] version = "^0.2.6" [dependencies.chrono] version = "0.4.10" features = [ "clock", "std", "wasmbind", ] optional = true default-features = false [dependencies.log] version = "0.4.11" features = ["std"] [dependencies.termcolor] version = "~1.1" [dependencies.thread_local] version = "~1.1" [dev-dependencies.clap] version = "3" features = ["cargo"] [dev-dependencies.docopt] version = "1.1" [dev-dependencies.libc] version = "0.2.18" [dev-dependencies.serde] version = "1.0" features = ["derive"] [dev-dependencies.structopt] version = "0.3.20" [features] default = ["timestamps"] timestamps = ["chrono"] [badges.appveyor] branch = "master" repository = "cardoe/stderrlog-rs" service = "github" [badges.is-it-maintained-issue-resolution] repository = "cardoe/stderrlog-rs" [badges.is-it-maintained-open-issues] repository = "cardoe/stderrlog-rs" [badges.maintenance] status = "passively-maintained" [badges.travis-ci] branch = "master" repository = "cardoe/stderrlog-rs" stderrlog-0.5.4/Cargo.toml.orig0000644000000024630000000000100120110ustar [package] authors = ["Doug Goldstein "] description = "Logger that logs to stderr based on verbosity specified" documentation = "https://docs.rs/stderrlog/" homepage = "https://github.com/cardoe/stderrlog-rs" keywords = ["log", "loglevel", "logging", "stderr", "stderrlog"] categories = ["development-tools::debugging"] license = "MIT OR Apache-2.0" name = "stderrlog" readme = "README.md" repository = "https://github.com/cardoe/stderrlog-rs" version = "0.5.4" edition = "2018" [badges] appveyor = { repository = "cardoe/stderrlog-rs", branch = "master", service = "github" } travis-ci = { repository = "cardoe/stderrlog-rs", branch = "master" } is-it-maintained-issue-resolution = { repository = "cardoe/stderrlog-rs" } is-it-maintained-open-issues = { repository = "cardoe/stderrlog-rs" } maintenance = { status = "passively-maintained" } [dependencies] atty = "^0.2.6" chrono = { version = "0.4.10", optional = true, default-features = false, features = ["clock", "std", "wasmbind"] } log = { version = "0.4.11", features = ["std"] } termcolor = "~1.1" thread_local = "~1.1" [dev-dependencies] clap = { version = "3", features = ["cargo"] } docopt = "1.1" serde = { version = "1.0", features = ["derive"] } libc = "0.2.18" structopt = "0.3.20" [features] default = ["timestamps"] timestamps = ["chrono"] stderrlog-0.5.4/Cargo.toml.orig000064400000000000000000000024631046102023000145330ustar 00000000000000[package] authors = ["Doug Goldstein "] description = "Logger that logs to stderr based on verbosity specified" documentation = "https://docs.rs/stderrlog/" homepage = "https://github.com/cardoe/stderrlog-rs" keywords = ["log", "loglevel", "logging", "stderr", "stderrlog"] categories = ["development-tools::debugging"] license = "MIT OR Apache-2.0" name = "stderrlog" readme = "README.md" repository = "https://github.com/cardoe/stderrlog-rs" version = "0.5.4" edition = "2018" [badges] appveyor = { repository = "cardoe/stderrlog-rs", branch = "master", service = "github" } travis-ci = { repository = "cardoe/stderrlog-rs", branch = "master" } is-it-maintained-issue-resolution = { repository = "cardoe/stderrlog-rs" } is-it-maintained-open-issues = { repository = "cardoe/stderrlog-rs" } maintenance = { status = "passively-maintained" } [dependencies] atty = "^0.2.6" chrono = { version = "0.4.10", optional = true, default-features = false, features = ["clock", "std", "wasmbind"] } log = { version = "0.4.11", features = ["std"] } termcolor = "~1.1" thread_local = "~1.1" [dev-dependencies] clap = { version = "3", features = ["cargo"] } docopt = "1.1" serde = { version = "1.0", features = ["derive"] } libc = "0.2.18" structopt = "0.3.20" [features] default = ["timestamps"] timestamps = ["chrono"] stderrlog-0.5.4/LICENSE-APACHE000064400000000000000000000251371046102023000135730ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. stderrlog-0.5.4/LICENSE-MIT000064400000000000000000000020661046102023000132770ustar 00000000000000Copyright (c) 2016 Doug Goldstein Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. stderrlog-0.5.4/README.md000064400000000000000000000046611046102023000131250ustar 00000000000000[![Build status](https://travis-ci.org/cardoe/stderrlog-rs.svg?branch=master)](https://travis-ci.org/cardoe/stderrlog-rs) [![Build status](https://ci.appveyor.com/api/projects/status/no8slwtoy5va0w4g/branch/master?svg=true)](https://ci.appveyor.com/project/cardoe/stderrlog-rs/branch/master) [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/cardoe/stderrlog-rs.svg)](http://isitmaintained.com/project/cardoe/stderrlog-rs "Average time to resolve an issue") [![Percentage of issues still open](http://isitmaintained.com/badge/open/cardoe/stderrlog-rs.svg)](http://isitmaintained.com/project/cardoe/stderrlog-rs "Percentage of issues still open") [![Rust version]( https://img.shields.io/badge/rust-1.36.0+-blue.svg)]() [![Documentation](https://docs.rs/stderrlog/badge.svg)](https://docs.rs/stderrlog) [![Latest version](https://img.shields.io/crates/v/stderrlog.svg)](https://crates.io/crates/stderrlog) [![All downloads](https://img.shields.io/crates/d/stderrlog.svg)](https://crates.io/crates/stderrlog) [![Downloads of latest version](https://img.shields.io/crates/dv/stderrlog.svg)](https://crates.io/crates/stderrlog) Logger that aims to provide a simple case of [env_logger](https://crates.io/crates/env_logger) that just logs to `stderr` based on verbosity. ## Documentation For a working example for [StructOpt](https::/crates.io/crates/structopt), [clap](https://crates.io/crates/clap), and [docopt](https://crates.io/crates/docopt) please see the [crate level documentation](https://docs.rs/stderrlog/*/stderrlog/). For example binaries showing how [module level logging](https://github.com/cardoe/stderrlog-rs/tree/master/examples/large-example) works, please see the `large-example` crate in `examples/`. ## Supported Versions * `stderrlog` 0.6.x supports 1) Rust 1.36.0 and newer 2) `log` >= 0.4.11 * `stderrlog` 0.5.x supports 1) Rust 1.36.0 and newer 2) `log` >= 0.4.11 * `stderrlog` 0.4.x supports 1) Rust 1.16.0 and newer 2) `log` >= 0.4.1 * `stderrlog` 0.3.x supports 1) Rust 1.16.0 and newer 2) `log` 0.3.x * `stderrlog` 0.2.x supports 1) Rust 1.13.0 and newer 2) `log` >= 0.3.0, < 0.3.9 ## Usage Add this to your `Cargo.toml`: ```toml [dependencies] stderrlog = "0.4" ``` and this to your main(): ```rust stderrlog::new().verbosity(args.flag_v).quiet(args.flag_q).init().unwrap(); ``` where your args struct is defined as: ```rust struct Args { flag_v: usize, flag_q: bool, ... } ``` stderrlog-0.5.4/SECURITY.md000064400000000000000000000006001046102023000134240ustar 00000000000000# Security Policy ## Supported Versions | Version | Supported | | ------- | ------------------ | | 0.5.x | :white_check_mark: | | < 0.5 | :x: | ## Reporting a Vulnerability Please email the address listed at [https://github.com/cardoe](https://github.com/cardoe) and include the name of the crate and the fact that its security related in the subject. stderrlog-0.5.4/appveyor.yml000064400000000000000000000015621046102023000142330ustar 00000000000000environment: # When this was added there were revocation check failures when using the # libcurl backend as libcurl checks by default, but rustup doesn't provide the # switch to turn this off. Switch to Hyper which looks to not check for # revocation by default like libcurl does. RUSTUP_USE_HYPER: 1 CARGO_HTTP_CHECK_REVOKE: false matrix: - TARGET: x86_64-pc-windows-gnu MSYS2_BITS: 64 - TARGET: i686-pc-windows-gnu MSYS2_BITS: 32 - TARGET: x86_64-pc-windows-msvc - TARGET: i686-pc-windows-msvc install: - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - rustup-init.exe -y --default-host %TARGET% - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin - rustc -V - cargo -V build: false test_script: - cargo test --target %TARGET% stderrlog-0.5.4/rustfmt.toml000064400000000000000000000000561046102023000142410ustar 00000000000000format_strings = false reorder_imports = true stderrlog-0.5.4/src/lib.rs000064400000000000000000000467611046102023000135600ustar 00000000000000// Copyright 2016-2018 Doug Goldstein // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![doc(html_root_url = "https://docs.rs/stderrlog/0.6.0")] //! A simple logger to provide semantics similar to what is expected //! of most UNIX utilities by logging to stderr and the higher the //! verbosity the higher the log level. It supports the //! ability to provide timestamps at different granularities. As //! well as colorizing the different log levels. //! //! ## Simple Use Case //! //! ```rust //! use log::*; //! //! fn main() { //! stderrlog::new().module(module_path!()).init().unwrap(); //! //! error!("some failure"); //! //! // ... //! } //! ``` //! //! # StructOpt Example //! //! ``` //! use log::*; //! use structopt::StructOpt; //! //! /// A StructOpt example //! #[derive(StructOpt, Debug)] //! #[structopt()] //! struct Opt { //! /// Silence all output //! #[structopt(short = "q", long = "quiet")] //! quiet: bool, //! /// Verbose mode (-v, -vv, -vvv, etc) //! #[structopt(short = "v", long = "verbose", parse(from_occurrences))] //! verbose: usize, //! /// Timestamp (sec, ms, ns, none) //! #[structopt(short = "t", long = "timestamp")] //! ts: Option, //! } //! //! fn main() { //! let opt = Opt::from_args(); //! //! stderrlog::new() //! .module(module_path!()) //! .quiet(opt.quiet) //! .verbosity(opt.verbose) //! .timestamp(opt.ts.unwrap_or(stderrlog::Timestamp::Off)) //! .init() //! .unwrap(); //! trace!("trace message"); //! debug!("debug message"); //! info!("info message"); //! warn!("warn message"); //! error!("error message"); //! } //! ``` //! //! ## docopt Example //! //! ```rust //! use log::*; //! use docopt::Docopt; //! use serde::Deserialize; //! //! const USAGE: &'static str = " //! Usage: program [-q] [-v...] //! "; //! //! #[derive(Debug, Deserialize)] //! struct Args { //! flag_q: bool, //! flag_v: usize, //! } //! //! fn main() { //! let args: Args = Docopt::new(USAGE) //! .and_then(|d| d.deserialize()) //! .unwrap_or_else(|e| e.exit()); //! //! stderrlog::new() //! .module(module_path!()) //! .quiet(args.flag_q) //! .timestamp(stderrlog::Timestamp::Second) //! .verbosity(args.flag_v) //! .init() //! .unwrap(); //! trace!("trace message"); //! debug!("debug message"); //! info!("info message"); //! warn!("warn message"); //! error!("error message"); //! //! // ... //! } //! ``` //! //! # clap Example //! //! ``` //! use clap::{Arg, App, crate_version}; //! use log::*; //! use std::str::FromStr; //! //! fn main() { //! let m = App::new("stderrlog example") //! .version(crate_version!()) //! .arg(Arg::with_name("verbosity") //! .short('v') //! .takes_value(true) //! .multiple(true) //! .help("Increase message verbosity")) //! .arg(Arg::with_name("quiet") //! .short('q') //! .help("Silence all output")) //! .arg(Arg::with_name("timestamp") //! .short('t') //! .help("prepend log lines with a timestamp") //! .takes_value(true) //! .possible_values(&["none", "sec", "ms", "ns"])) //! .get_matches(); //! //! let verbose = m.occurrences_of("verbosity") as usize; //! let quiet = m.is_present("quiet"); //! let ts = m.value_of("timestamp").map(|v| { //! stderrlog::Timestamp::from_str(v).unwrap_or_else(|_| { //! clap::Error::raw(clap::ErrorKind::InvalidValue, "invalid value for 'timestamp'").exit() //! }) //! }).unwrap_or(stderrlog::Timestamp::Off); //! //! stderrlog::new() //! .module(module_path!()) //! .quiet(quiet) //! .verbosity(verbose) //! .timestamp(ts) //! .init() //! .unwrap(); //! trace!("trace message"); //! debug!("debug message"); //! info!("info message"); //! warn!("warn message"); //! error!("error message"); //! } //! ``` //! //! ### `log` Compatibility //! //! The 0.5.x versions of `stderrlog` aim to provide compatibility with //! applications using `log` >= 0.4.11. //! //! ### Rust Compatibility //! //! `stderrlog` is serious about backwards compat. `stderrlog` //! pins the minimum required version of Rust in the CI build. //! Bumping the minimum version of Rust is a minor breaking //! change and requires a minor version to be bumped. //! //! The minimum supported Rust version for this release is 1.36.0. //! //! ### Module Level Logging //! //! `stderrlog` has the ability to limit the components which can log. //! Many crates use [log](https://docs.rs/log/*/log/) but you may not //! want their output in your application. For example //! [hyper](https://docs.rs/hyper/*/hyper/) makes heavy use of log but //! when your application receives `-vvvvv` to enable the `trace!()` //! messages you don't want the output of `hyper`'s `trace!()` level. //! //! To support this `stderrlog` includes a `module()` method allowing //! you to specify the modules that are allowed to log. The examples //! above use the `module_path!()` macro to enable logging only for //! the binary itself but none of its dependencies. To enable logging //! from extra crates just add another call to `module()` with the //! name of the crate. To enable logging for only a module within //! that crate specify `crate::module` to `module()`. crates and //! modules will be named the same way would would include them in //! source code with `use` (e.g. `some-crate` would be `some_crate`). //! //! For a good example of how the module level logging works see the //! [large-example //! crate](https://github.com/cardoe/stderrlog-rs/tree/master/examples/large-example) //! under examples, you'll want to run the //! following binaries to see all the examples: //! //! - `cargo run --bin large-example --` //! - `cargo run --bin another --` //! - `cargo run --bin yet --` //! //! ### Features //! //! `stderrlog` has the following default crate features, which can be disabled //! to reduce the number of dependencies: //! //! - `timestamps`: Provides support for log timestamp prefixes (uses the `chrono` crate). use atty::Stream; #[cfg(feature = "timestamps")] use chrono::Local; use log::{Level, LevelFilter, Log, Metadata, Record}; use std::cell::RefCell; use std::fmt; use std::io::{self, Write}; #[cfg(feature = "timestamps")] use std::str::FromStr; use termcolor::{Color, ColorSpec, StandardStream, WriteColor}; pub use termcolor::ColorChoice; use thread_local::ThreadLocal; /// State of the timestamping in the logger. #[cfg(feature = "timestamps")] #[derive(Clone, Copy, Debug)] pub enum Timestamp { /// Disable timestamping of log messages Off, /// Timestamp with second granularity Second, /// Timestamp with millisecond granularity Millisecond, /// Timestamp with microsecond granularity Microsecond, /// Timestamp with nanosecond granularity Nanosecond, } /// Provides a quick conversion of the following: /// /// - "sec" -> `Timestamp::Second` /// - "ms" -> `Timestamp::Millisecond` /// - "us" -> `Timestamp::Microsecond` /// - "ns" -> `Timestamp::Nanosecond` /// - "none" | "off" -> `Timestamp::Off` /// /// This is provided as a helper for argument parsers #[cfg(feature = "timestamps")] impl FromStr for Timestamp { type Err = String; fn from_str(s: &str) -> Result { match s { "ns" => Ok(Timestamp::Nanosecond), "ms" => Ok(Timestamp::Millisecond), "us" => Ok(Timestamp::Microsecond), "sec" => Ok(Timestamp::Second), "none" | "off" => Ok(Timestamp::Off), _ => Err("invalid value".into()), } } } /// Data specific to this logger pub struct StdErrLog { verbosity: LevelFilter, quiet: bool, show_level: bool, #[cfg(feature = "timestamps")] timestamp: Timestamp, modules: Vec, writer: ThreadLocal>, color_choice: ColorChoice, show_module_names: bool, } impl fmt::Debug for StdErrLog { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let mut builder = f.debug_struct("StdErrLog"); builder .field("verbosity", &self.verbosity) .field("quiet", &self.quiet) .field("show_level", &self.show_level); #[cfg(feature = "timestamps")] builder.field("timestamp", &self.timestamp); builder .field("modules", &self.modules) .field("writer", &"stderr") .field("color_choice", &self.color_choice) .field("show_module_names", &self.show_module_names) .finish() } } impl Clone for StdErrLog { fn clone(&self) -> StdErrLog { StdErrLog { modules: self.modules.clone(), writer: ThreadLocal::new(), ..*self } } } impl Log for StdErrLog { fn enabled(&self, metadata: &Metadata) -> bool { metadata.level() <= self.log_level_filter() && self.includes_module(metadata.target()) } fn log(&self, record: &Record) { // if logging isn't enabled for this level do a quick out if !self.enabled(record.metadata()) { return; } let writer = self .writer .get_or(|| RefCell::new(StandardStream::stderr(self.color_choice))); let writer = writer.borrow_mut(); let mut writer = io::LineWriter::new(writer.lock()); let color = match record.metadata().level() { Level::Error => Color::Red, Level::Warn => Color::Magenta, Level::Info => Color::Yellow, Level::Debug => Color::Cyan, Level::Trace => Color::Blue, }; { writer .get_mut() .set_color(ColorSpec::new().set_fg(Some(color))) .expect("failed to set color"); } if self.show_module_names { let _ = write!(writer, "{}: ", record.metadata().target()); } #[cfg(feature = "timestamps")] match self.timestamp { Timestamp::Second => { let fmt = "%Y-%m-%dT%H:%M:%S%:z"; let _ = write!(writer, "{} - ", Local::now().format(fmt)); } Timestamp::Millisecond => { let fmt = "%Y-%m-%dT%H:%M:%S%.3f%:z"; let _ = write!(writer, "{} - ", Local::now().format(fmt)); } Timestamp::Microsecond => { let fmt = "%Y-%m-%dT%H:%M:%S%.6f%:z"; let _ = write!(writer, "{} - ", Local::now().format(fmt)); } Timestamp::Nanosecond => { let fmt = "%Y-%m-%dT%H:%M:%S%.9f%:z"; let _ = write!(writer, "{} - ", Local::now().format(fmt)); } Timestamp::Off => {} } if self.show_level { let _ = write!(writer, "{} - ", record.level()); } let _ = writeln!(writer, "{}", record.args()); { writer.get_mut().reset().expect("failed to reset the color"); } } fn flush(&self) { let writer = self .writer .get_or(|| RefCell::new(StandardStream::stderr(self.color_choice))); let mut writer = writer.borrow_mut(); writer.flush().ok(); } } pub enum LogLevelNum { Off, Error, Warn, Info, Debug, Trace, } impl From for LogLevelNum { fn from(verbosity: usize) -> Self { match verbosity { 0 => LogLevelNum::Error, 1 => LogLevelNum::Warn, 2 => LogLevelNum::Info, 3 => LogLevelNum::Debug, _ => LogLevelNum::Trace, } } } impl From for LogLevelNum { fn from(l: Level) -> Self { match l { Level::Error => LogLevelNum::Error, Level::Warn => LogLevelNum::Warn, Level::Info => LogLevelNum::Info, Level::Debug => LogLevelNum::Debug, Level::Trace => LogLevelNum::Trace, } } } impl From for LogLevelNum { fn from(l: LevelFilter) -> Self { match l { LevelFilter::Off => LogLevelNum::Off, LevelFilter::Error => LogLevelNum::Error, LevelFilter::Warn => LogLevelNum::Warn, LevelFilter::Info => LogLevelNum::Info, LevelFilter::Debug => LogLevelNum::Debug, LevelFilter::Trace => LogLevelNum::Trace, } } } impl StdErrLog { /// creates a new stderr logger pub fn new() -> StdErrLog { StdErrLog { verbosity: LevelFilter::Error, quiet: false, show_level: true, #[cfg(feature = "timestamps")] timestamp: Timestamp::Off, modules: Vec::new(), writer: ThreadLocal::new(), color_choice: ColorChoice::Auto, show_module_names: false, } } /// Sets the verbosity level of messages that will be displayed /// /// Values can be supplied as: /// - usize /// - log::Level /// - log::LevelFilter /// - LogLevelNum /// /// Values map as follows: /// 0 -> Error /// 1 -> Warn /// 2 -> Info /// 3 -> Debug /// 4 or higher -> Trace pub fn verbosity>(&mut self, verbosity: V) -> &mut StdErrLog { self.verbosity = match verbosity.into() { LogLevelNum::Off => LevelFilter::Off, LogLevelNum::Error => LevelFilter::Error, LogLevelNum::Warn => LevelFilter::Warn, LogLevelNum::Info => LevelFilter::Info, LogLevelNum::Debug => LevelFilter::Debug, LogLevelNum::Trace => LevelFilter::Trace, }; self } /// silence all output, no matter the value of verbosity pub fn quiet(&mut self, quiet: bool) -> &mut StdErrLog { self.quiet = quiet; self } /// Enables or disables the use of levels in log messages (default is true) pub fn show_level(&mut self, levels: bool) -> &mut StdErrLog { self.show_level = levels; self } /// Enables or disables the use of timestamps in log messages #[cfg(feature = "timestamps")] pub fn timestamp(&mut self, timestamp: Timestamp) -> &mut StdErrLog { self.timestamp = timestamp; self } /// Enables or disables the use of color in log messages pub fn color(&mut self, choice: ColorChoice) -> &mut StdErrLog { self.color_choice = choice; self } /// specify a module to allow to log to stderr pub fn module>(&mut self, module: T) -> &mut StdErrLog { self._module(module.into()) } /// Enables or disables the use of module names in log messages pub fn show_module_names(&mut self, show_module_names: bool) -> &mut StdErrLog { self.show_module_names = show_module_names; self } fn _module(&mut self, module: String) -> &mut StdErrLog { // If Ok, the module was already found if let Err(i) = self.modules.binary_search(&module) { // If a super-module of the current module already exists, don't insert this module if i == 0 || !is_submodule(&self.modules[i - 1], &module) { // Remove any submodules of the module we're inserting let submodule_count = self.modules[i..] .iter() .take_while(|possible_submodule| is_submodule(&module, possible_submodule)) .count(); self.modules.drain(i..i + submodule_count); self.modules.insert(i, module); } } self } /// specify modules to allow to log to stderr pub fn modules, I: IntoIterator>( &mut self, modules: I, ) -> &mut StdErrLog { for module in modules { self.module(module); } self } fn log_level_filter(&self) -> LevelFilter { if self.quiet { LevelFilter::Off } else { self.verbosity } } fn includes_module(&self, module_path: &str) -> bool { // If modules is empty, include all module paths if self.modules.is_empty() { return true; } // if a prefix of module_path is in `self.modules`, it must // be located at the first location before // where module_path would be. match self .modules .binary_search_by(|module| module.as_str().cmp(module_path)) { Ok(_) => { // Found exact module: return true true } Err(0) => { // if there's no item which would be located before module_path, no prefix is there false } Err(i) => is_submodule(&self.modules[i - 1], module_path), } } /// sets the the logger as active pub fn init(&mut self) -> Result<(), log::SetLoggerError> { /* if the user is using auto color choices then * detect if stderr is a tty, if it is continue * otherwise turn off colors by default */ self.color_choice = match self.color_choice { ColorChoice::Auto => { if atty::is(Stream::Stderr) { ColorChoice::Auto } else { ColorChoice::Never } } other => other, }; log::set_max_level(self.log_level_filter()); log::set_boxed_logger(Box::new(self.clone())) } } impl Default for StdErrLog { fn default() -> Self { StdErrLog::new() } } /// creates a new stderr logger pub fn new() -> StdErrLog { StdErrLog::new() } fn is_submodule(parent: &str, possible_child: &str) -> bool { // Treat as bytes, because we'll be doing slicing, and we only care about ':' chars let parent = parent.as_bytes(); let possible_child = possible_child.as_bytes(); // a longer module path cannot be a parent of a shorter module path if parent.len() > possible_child.len() { return false; } // If the path up to the parent isn't the same as the child, if parent != &possible_child[..parent.len()] { return false; } // Either the path is exactly the same, or the sub module should have a "::" after // the length of the parent path. This prevents things like 'a::bad' being considered // a submodule of 'a::b' parent.len() == possible_child.len() || possible_child.get(parent.len()..parent.len() + 2) == Some(b"::") } #[cfg(test)] mod tests { use super::is_submodule; #[test] fn submodule() { assert!(is_submodule("a", "a::b::c::d")); assert!(is_submodule("a::b::c", "a::b::c::d")); assert!(is_submodule("a::b::c", "a::b::c")); assert!(!is_submodule("a::b::c", "a::bad::c")); assert!(!is_submodule("a::b::c", "a::b::cab")); assert!(!is_submodule("a::b::c", "a::b::cab::d")); assert!(!is_submodule("a::b::c", "a::b")); assert!(!is_submodule("a::b::c", "a::bad")); } #[test] fn test_default_level() { super::new().module(module_path!()).init().unwrap(); assert_eq!(log::Level::Error, log::max_level()) } } stderrlog-0.5.4/tests/debug_level.rs000064400000000000000000000005731046102023000156310ustar 00000000000000use log::*; #[test] fn debug_level() { stderrlog::new() .module(module_path!()) .timestamp(stderrlog::Timestamp::Second) .verbosity(3) .init() .unwrap(); error!("error msg"); warn!("warning msg"); info!("info msg"); debug!("debug msg"); trace!("trace msg"); assert_eq!(log::Level::Debug, log::max_level()) } stderrlog-0.5.4/tests/debug_level_log.rs000064400000000000000000000006231046102023000164660ustar 00000000000000use log::*; #[test] fn debug_level_log() { stderrlog::new() .module(module_path!()) .timestamp(stderrlog::Timestamp::Nanosecond) .verbosity(log::Level::Debug) .init() .unwrap(); error!("error msg"); warn!("warning msg"); info!("info msg"); debug!("debug msg"); trace!("trace msg"); assert_eq!(log::Level::Debug, log::max_level()) } stderrlog-0.5.4/tests/error_level.rs000064400000000000000000000006001046102023000156630ustar 00000000000000use log::*; #[test] fn error_level() { stderrlog::new() .module(module_path!()) .timestamp(stderrlog::Timestamp::Millisecond) .verbosity(0) .init() .unwrap(); error!("error msg"); warn!("warning msg"); info!("info msg"); debug!("debug msg"); trace!("trace msg"); assert_eq!(log::Level::Error, log::max_level()) } stderrlog-0.5.4/tests/info_level.rs000064400000000000000000000005761046102023000155010ustar 00000000000000use log::*; #[test] fn info_level() { stderrlog::new() .module(module_path!()) .timestamp(stderrlog::Timestamp::Microsecond) .verbosity(2) .init() .unwrap(); error!("error msg"); warn!("warning msg"); info!("info msg"); debug!("debug msg"); trace!("trace msg"); assert_eq!(log::Level::Info, log::max_level()) } stderrlog-0.5.4/tests/module_inclusion.rs000064400000000000000000000024421046102023000167210ustar 00000000000000mod utils; mod included_not { use crate::utils; use log::log_enabled; use stderrlog::StdErrLog; #[test] fn including_module_with_substring_name() { utils::init(); let mut logger = StdErrLog::new(); logger.module("module_inclusion::included"); logger.verbosity(10); utils::set_logger(logger); assert!(!log_enabled!(log::Level::Error)); } } mod included { mod b { use crate::utils; use log::log_enabled; use stderrlog::StdErrLog; #[test] fn super_and_submodule_included() { utils::init(); let mut logger = StdErrLog::new(); logger.module("module_inclusion::included"); logger.module("module_inclusion::included::a"); logger.verbosity(10); utils::set_logger(logger); assert!(log_enabled!(log::Level::Error)); } #[test] fn sub_and_supermodule_included() { utils::init(); let mut logger = StdErrLog::new(); logger.module("module_inclusion::included::a"); logger.module("module_inclusion::included"); logger.verbosity(10); utils::set_logger(logger); assert!(log_enabled!(log::Level::Error)); } } } stderrlog-0.5.4/tests/no_levels_output.rs000064400000000000000000000005521046102023000167570ustar 00000000000000use log::*; #[test] fn no_levels_output() { stderrlog::new() .module(module_path!()) .verbosity(4) .show_level(false) .init() .unwrap(); error!("error msg"); warn!("warning msg"); info!("info msg"); debug!("debug msg"); trace!("trace msg"); assert_eq!(log::Level::Trace, log::max_level()) } stderrlog-0.5.4/tests/quiet_trace_level.rs000064400000000000000000000006321046102023000170440ustar 00000000000000use log::*; #[test] fn quiet_trace_level() { stderrlog::new() .module(module_path!()) .timestamp(stderrlog::Timestamp::Second) .verbosity(4) .quiet(true) .init() .unwrap(); error!("error msg"); warn!("warning msg"); info!("info msg"); debug!("debug msg"); trace!("trace msg"); assert_eq!(log::LevelFilter::Off, log::max_level()) } stderrlog-0.5.4/tests/trace_level.rs000064400000000000000000000005121046102023000156320ustar 00000000000000use log::*; #[test] fn trace_level() { stderrlog::new() .module(module_path!()) .verbosity(4) .init() .unwrap(); error!("error msg"); warn!("warning msg"); info!("info msg"); debug!("debug msg"); trace!("trace msg"); assert_eq!(log::Level::Trace, log::max_level()) } stderrlog-0.5.4/tests/utils/mod.rs000064400000000000000000000026511046102023000152720ustar 00000000000000use log::{self, Log}; use std::cell::RefCell; use std::sync; use stderrlog::StdErrLog; thread_local! { pub static LOGGER_INSTANCE: RefCell> = RefCell::new(None); } static INIT_LOGGER: sync::Once = sync::Once::new(); struct DelegatingLogger; impl Log for DelegatingLogger { fn enabled(&self, metadata: &log::Metadata) -> bool { LOGGER_INSTANCE.with(|instance| { let instance = instance.borrow(); if let Some(ref instance) = *instance { instance.enabled(metadata) } else { false } }) } fn log(&self, record: &log::Record) { LOGGER_INSTANCE.with(|instance| { let instance = instance.borrow(); if let Some(ref instance) = *instance { instance.log(record); } }); } fn flush(&self) { LOGGER_INSTANCE.with(|instance| { let instance = instance.borrow(); if let Some(ref instance) = *instance { instance.flush(); } }); } } pub fn init() { INIT_LOGGER.call_once(|| { log::set_max_level(log::LevelFilter::max()); log::set_boxed_logger(Box::new(DelegatingLogger)).unwrap(); }); } pub fn set_logger(logger: StdErrLog) { LOGGER_INSTANCE.with(|instance| { let mut instance = instance.borrow_mut(); *instance = Some(logger); }); } stderrlog-0.5.4/tests/warn_level.rs000064400000000000000000000005101046102023000155010ustar 00000000000000use log::*; #[test] fn warn_level() { stderrlog::new() .module(module_path!()) .verbosity(1) .init() .unwrap(); error!("error msg"); warn!("warning msg"); info!("info msg"); debug!("debug msg"); trace!("trace msg"); assert_eq!(log::Level::Warn, log::max_level()) }