mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 13:17:56 +00:00
Add log rotation (#6564)
* Use flexi_logger; Add log rotation * Add default rotation; Add FlexiLogger error * Fix compilation error * Remove logging to stdout if it's not a tty * Fix formatting Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Remove needless debug statement * Default to unlimited size for log rotation * Add more comments about log-age option * Remove unused variable * Fix typo in comment Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! Initialization errors.
|
||||
use flexi_logger::FlexiLoggerError;
|
||||
|
||||
/// Result type alias for the CLI.
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
@@ -32,6 +33,8 @@ pub enum Error {
|
||||
Service(sc_service::Error),
|
||||
/// Client error
|
||||
Client(sp_blockchain::Error),
|
||||
/// Flexi Logger error
|
||||
FlexiLogger(FlexiLoggerError),
|
||||
/// Input error
|
||||
#[from(ignore)]
|
||||
Input(String),
|
||||
@@ -65,6 +68,7 @@ impl std::error::Error for Error {
|
||||
Error::Cli(ref err) => Some(err),
|
||||
Error::Service(ref err) => Some(err),
|
||||
Error::Client(ref err) => Some(err),
|
||||
Error::FlexiLogger(ref err) => Some(err),
|
||||
Error::Input(_) => None,
|
||||
Error::InvalidListenMultiaddress => None,
|
||||
Error::Other(_) => None,
|
||||
|
||||
Reference in New Issue
Block a user