diff --git a/COMMANDS.md b/COMMANDS.md
index 0a1bf42..b87feb1 100644
--- a/COMMANDS.md
+++ b/COMMANDS.md
@@ -33,5 +33,6 @@ Following are the currently available commands for [gpg-tui](https://github.com/
| Go to the previous tab | `:previous` | - |
| Refresh the application | `:refresh` | - |
| Refresh the keyring | `:refresh keys` | - |
+| Show logs | `:logs` | - |
| Quit the application | `:quit` | - |
| Do nothing | `:none` | - |
diff --git a/Cargo.lock b/Cargo.lock
index 8cae4ec..4320937 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -29,6 +29,15 @@ dependencies = [
"zerocopy",
]
+[[package]]
+name = "aho-corasick"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "allocator-api2"
version = "0.2.16"
@@ -52,9 +61,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.8"
+version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "628a8f9bd1e24b4e0db2b4bc2d000b001e7dd032d54afa60a68836aeec5aa54a"
+checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -66,9 +75,9 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.2"
+version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea"
+checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc"
[[package]]
name = "anstyle-parse"
@@ -553,6 +562,29 @@ version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
+[[package]]
+name = "env_filter"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea"
+dependencies = [
+ "log",
+ "regex",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "env_filter",
+ "humantime",
+ "log",
+]
+
[[package]]
name = "equivalent"
version = "1.0.1"
@@ -599,6 +631,15 @@ dependencies = [
"miniz_oxide",
]
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
[[package]]
name = "generic-array"
version = "0.14.7"
@@ -658,7 +699,9 @@ dependencies = [
"copypasta-ext",
"crossterm",
"dirs-next",
+ "env_logger",
"gpgme",
+ "log",
"pretty_assertions",
"ratatui",
"ratatui-splash-screen",
@@ -666,6 +709,7 @@ dependencies = [
"shellexpand",
"tinytemplate",
"toml 0.8.8",
+ "tui-logger",
"unicode-width",
]
@@ -732,6 +776,12 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
[[package]]
name = "iana-time-zone"
version = "0.1.57"
@@ -866,9 +916,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.20"
+version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
+checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
[[package]]
name = "lru"
@@ -1166,6 +1216,35 @@ dependencies = [
"thiserror",
]
+[[package]]
+name = "regex"
+version = "1.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
+
[[package]]
name = "rustc-demangle"
version = "0.1.23"
@@ -1535,6 +1614,20 @@ dependencies = [
"winnow",
]
+[[package]]
+name = "tui-logger"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4358d7a45f901c23c4e43e0885c159f035b2ca3a90e646f4d1dbae80b45a6c79"
+dependencies = [
+ "chrono",
+ "fxhash",
+ "lazy_static",
+ "log",
+ "parking_lot",
+ "ratatui",
+]
+
[[package]]
name = "typenum"
version = "1.17.0"
diff --git a/Cargo.toml b/Cargo.toml
index 2a93cf2..f2f98d7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -46,6 +46,8 @@ clap_complete = "4.5.1"
tinytemplate = "1.2.1"
better-panic = "0.3.0"
ratatui-splash-screen = "0.1.0"
+env_logger = "0.11.3"
+log = "0.4.21"
[dependencies.crossterm]
version = "0.27.0"
@@ -59,6 +61,11 @@ features = ["derive", "env", "wrap_help", "cargo"]
version = "1.0.197"
features = ["derive"]
+[dependencies.tui-logger]
+version = "0.11.0"
+default-features = false
+features = ["crossterm"]
+
[dev-dependencies]
pretty_assertions = "1.4.0"
diff --git a/README.md b/README.md
index 7551db1..d60ed54 100644
--- a/README.md
+++ b/README.md
@@ -28,74 +28,78 @@ It aims to ease the key management operations such as listing/exporting/signing
Table of Contents
-- [About](#about)
-- [Requirements](#requirements)
-- [Installation](#installation)
- - [Cargo](#cargo)
- - [Arch Linux](#arch-linux)
- - [Community](#community)
- - [AUR](#aur)
- - [Alpine Linux](#alpine-linux)
- - [Gentoo](#gentoo)
- - [Homebrew](#homebrew)
- - [Docker](#docker)
- - [Docker Hub](#docker-hub)
- - [Using the Dockerfile](#using-the-dockerfile)
- - [FreeBSD](#freebsd)
- - [Building from source](#building-from-source)
- - [Binary releases](#binary-releases)
- - [NetBSD](#netbsd)
- - [Install using the package manager](#install-using-the-package-manager)
- - [Building from source](#building-from-source-1)
- - [Manually](#manually)
- - [Building from source](#building-from-source-2)
- - [Binary releases](#binary-releases-1)
-- [Usage](#usage)
-- [Configuration](#configuration)
-- [Key Bindings](#key-bindings)
- - [User Interface](#user-interface)
- - [Key Management](#key-management)
- - [Customization](#customization)
-- [Approach](#approach)
- - [Detail Levels](#detail-levels)
- - [Key Information](#key-information)
- - [User Information](#user-information)
-- [Features](#features)
- - [User Interface](#user-interface-1)
- - [Scrolling](#scrolling)
- - [Options Menu](#options-menu)
- - [Copy / Paste](#copy--paste)
- - [Selection Mode](#selection-mode)
- - [Detailed View](#detailed-view)
- - [Search](#search)
- - [File explorer](#file-explorer)
- - [Running commands](#running-commands)
- - [Key Management](#key-management-1)
- - [List](#list)
- - [Export](#export)
- - [Sign](#sign)
- - [Edit](#edit)
- - [Import/Receive](#importreceive)
- - [Send](#send)
- - [Generate](#generate)
- - [Delete](#delete)
- - [Refresh](#refresh)
- - [Styling](#styling)
- - [Colors](#colors)
- - [Splash screen](#splash-screen)
-- [Roadmap](#roadmap)
- - [Platforms](#platforms)
- - [Packaging](#packaging)
- - [Command-Line Fallback](#command-line-fallback)
- - [Key Management Only](#key-management-only)
-- [Resources](#resources)
- - [About the project](#about-the-project)
- - [External links](#external-links)
- - [In the media](#in-the-media)
-- [Contact](#contact)
-- [Funding](#funding)
-- [License](#license)
-- [Copyright](#copyright)
+
+
+* [Requirements](#requirements)
+* [Installation](#installation)
+ * [Cargo](#cargo)
+ * [Arch Linux](#arch-linux)
+ * [Community](#community)
+ * [AUR](#aur)
+ * [Alpine Linux](#alpine-linux)
+ * [Gentoo](#gentoo)
+ * [Homebrew](#homebrew)
+ * [Docker](#docker)
+ * [Docker Hub](#docker-hub)
+ * [Using the Dockerfile](#using-the-dockerfile)
+ * [FreeBSD](#freebsd)
+ * [Building from source](#building-from-source)
+ * [Binary releases](#binary-releases)
+ * [NetBSD](#netbsd)
+ * [Install using the package manager](#install-using-the-package-manager)
+ * [Building from source](#building-from-source-1)
+ * [Manually](#manually)
+ * [Building from source](#building-from-source-2)
+ * [Binary releases](#binary-releases-1)
+* [Usage](#usage)
+* [Configuration](#configuration)
+* [Key Bindings](#key-bindings)
+ * [User Interface](#user-interface)
+ * [Key Management](#key-management)
+ * [Customization](#customization)
+* [Approach](#approach)
+ * [Detail Levels](#detail-levels)
+ * [Key Information](#key-information)
+ * [User Information](#user-information)
+* [Features](#features)
+ * [User Interface](#user-interface-1)
+ * [Scrolling](#scrolling)
+ * [Options Menu](#options-menu)
+ * [Copy / Paste](#copy--paste)
+ * [Selection Mode](#selection-mode)
+ * [Detailed View](#detailed-view)
+ * [Search](#search)
+ * [File explorer](#file-explorer)
+ * [Show logs](#show-logs)
+ * [Running commands](#running-commands)
+ * [Key Management](#key-management-1)
+ * [List](#list)
+ * [Export](#export)
+ * [Sign](#sign)
+ * [Edit](#edit)
+ * [Import/Receive](#importreceive)
+ * [Send](#send)
+ * [Generate](#generate)
+ * [Delete](#delete)
+ * [Refresh](#refresh)
+ * [Styling](#styling)
+ * [Colors](#colors)
+ * [Splash screen](#splash-screen)
+* [Roadmap](#roadmap)
+ * [Platforms](#platforms)
+ * [Packaging](#packaging)
+ * [Command-Line Fallback](#command-line-fallback)
+ * [Key Management Only](#key-management-only)
+* [Resources](#resources)
+ * [About the project](#about-the-project)
+ * [External links](#external-links)
+ * [In the media](#in-the-media)
+* [Contact](#contact)
+* [Funding](#funding)
+* [License](#license)
+* [Copyright](#copyright)
+
+
@@ -300,6 +304,7 @@ Options:
-s, --style