Merge pull request #415 from matthiasbeyer/libimagerror/move-trace_error
Libimagerror/move trace error
This commit is contained in:
commit
727bc217aa
27 changed files with 40 additions and 38 deletions
|
@ -11,6 +11,9 @@ version = "2.0.1"
|
||||||
[dependencies.libimagrt]
|
[dependencies.libimagrt]
|
||||||
path = "../libimagrt"
|
path = "../libimagrt"
|
||||||
|
|
||||||
|
[dependencies.libimagerror]
|
||||||
|
path = "../libimagerror"
|
||||||
|
|
||||||
[dependencies.libimagutil]
|
[dependencies.libimagutil]
|
||||||
path = "../libimagutil"
|
path = "../libimagutil"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ use std::str::FromStr;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
use libimagcounter::counter::Counter;
|
use libimagcounter::counter::Counter;
|
||||||
|
|
||||||
pub fn create(rt: &Runtime) {
|
pub fn create(rt: &Runtime) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
use libimagcounter::counter::Counter;
|
use libimagcounter::counter::Counter;
|
||||||
|
|
||||||
pub fn delete(rt: &Runtime) {
|
pub fn delete(rt: &Runtime) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ use libimagcounter::counter::Counter;
|
||||||
use libimagcounter::error::CounterError;
|
use libimagcounter::error::CounterError;
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagutil::key_value_split::IntoKeyValue;
|
use libimagutil::key_value_split::IntoKeyValue;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
type Result<T> = RResult<T, CounterError>;
|
type Result<T> = RResult<T, CounterError>;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
use libimagcounter::counter::Counter;
|
use libimagcounter::counter::Counter;
|
||||||
|
|
||||||
pub fn list(rt: &Runtime) {
|
pub fn list(rt: &Runtime) {
|
||||||
|
|
|
@ -19,6 +19,7 @@ extern crate clap;
|
||||||
|
|
||||||
extern crate libimagcounter;
|
extern crate libimagcounter;
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
|
extern crate libimagerror;
|
||||||
extern crate libimagutil;
|
extern crate libimagutil;
|
||||||
|
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
@ -26,7 +27,7 @@ use std::str::FromStr;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagcounter::counter::Counter;
|
use libimagcounter::counter::Counter;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
use libimagutil::key_value_split::IntoKeyValue;
|
use libimagutil::key_value_split::IntoKeyValue;
|
||||||
|
|
||||||
mod create;
|
mod create;
|
||||||
|
|
|
@ -20,6 +20,6 @@ path = "../libimagrt"
|
||||||
[dependencies.libimagentrylink]
|
[dependencies.libimagentrylink]
|
||||||
path = "../libimagentrylink"
|
path = "../libimagentrylink"
|
||||||
|
|
||||||
[dependencies.libimagutil]
|
[dependencies.libimagerror]
|
||||||
path = "../libimagutil"
|
path = "../libimagerror"
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ extern crate url;
|
||||||
extern crate libimagentrylink;
|
extern crate libimagentrylink;
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
extern crate libimagstore;
|
extern crate libimagstore;
|
||||||
extern crate libimagutil;
|
extern crate libimagerror;
|
||||||
|
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
@ -33,7 +33,7 @@ use libimagstore::error::StoreError;
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagstore::store::Store;
|
use libimagstore::store::Store;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
use libimagentrylink::external::ExternalLinker;
|
use libimagentrylink::external::ExternalLinker;
|
||||||
use clap::ArgMatches;
|
use clap::ArgMatches;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
@ -74,7 +74,7 @@ fn main() {
|
||||||
|
|
||||||
fn handle_internal_linking(rt: &Runtime) {
|
fn handle_internal_linking(rt: &Runtime) {
|
||||||
use libimagentrylink::internal::InternalLinker;
|
use libimagentrylink::internal::InternalLinker;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
debug!("Handle internal linking call");
|
debug!("Handle internal linking call");
|
||||||
let cmd = rt.cli().subcommand_matches("internal").unwrap();
|
let cmd = rt.cli().subcommand_matches("internal").unwrap();
|
||||||
|
@ -192,7 +192,7 @@ fn get_entry_by_name<'a>(rt: &'a Runtime, name: &str) -> Result<FileLockEntry<'a
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_external_linking(rt: &Runtime) {
|
fn handle_external_linking(rt: &Runtime) {
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
let scmd = rt.cli().subcommand_matches("external").unwrap();
|
let scmd = rt.cli().subcommand_matches("external").unwrap();
|
||||||
let entry_name = scmd.value_of("id").unwrap(); // enforced by clap
|
let entry_name = scmd.value_of("id").unwrap(); // enforced by clap
|
||||||
|
|
|
@ -18,6 +18,6 @@ path = "../libimagnotes"
|
||||||
[dependencies.libimagentrytag]
|
[dependencies.libimagentrytag]
|
||||||
path = "../libimagentrytag"
|
path = "../libimagentrytag"
|
||||||
|
|
||||||
[dependencies.libimagutil]
|
[dependencies.libimagerror]
|
||||||
path = "../libimagutil"
|
path = "../libimagerror"
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,14 @@ extern crate semver;
|
||||||
extern crate libimagnotes;
|
extern crate libimagnotes;
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
extern crate libimagentrytag;
|
extern crate libimagentrytag;
|
||||||
extern crate libimagutil;
|
extern crate libimagerror;
|
||||||
|
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
use libimagrt::edit::Edit;
|
use libimagrt::edit::Edit;
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagnotes::note::Note;
|
use libimagnotes::note::Note;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
mod ui;
|
mod ui;
|
||||||
use ui::build_ui;
|
use ui::build_ui;
|
||||||
|
|
|
@ -14,7 +14,7 @@ use libimagrt::runtime::Runtime;
|
||||||
use libimagstore::store::Entry;
|
use libimagstore::store::Entry;
|
||||||
use libimagstore::store::EntryHeader;
|
use libimagstore::store::EntryHeader;
|
||||||
use libimagstore::storeid::build_entry_path;
|
use libimagstore::storeid::build_entry_path;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
use error::StoreError;
|
use error::StoreError;
|
||||||
use error::StoreErrorKind;
|
use error::StoreErrorKind;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use libimagstore::storeid::build_entry_path;
|
use libimagstore::storeid::build_entry_path;
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
pub fn delete(rt: &Runtime) {
|
pub fn delete(rt: &Runtime) {
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
|
@ -6,7 +6,7 @@ use toml::Value;
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagstore::storeid::build_entry_path;
|
use libimagstore::storeid::build_entry_path;
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
pub fn retrieve(rt: &Runtime) {
|
pub fn retrieve(rt: &Runtime) {
|
||||||
rt.cli()
|
rt.cli()
|
||||||
|
|
|
@ -3,7 +3,7 @@ use std::process::exit;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagstore::storeid::build_entry_path;
|
use libimagstore::storeid::build_entry_path;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
use util::build_toml_header;
|
use util::build_toml_header;
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ path = "../libimagstore"
|
||||||
[dependencies.libimagrt]
|
[dependencies.libimagrt]
|
||||||
path = "../libimagrt"
|
path = "../libimagrt"
|
||||||
|
|
||||||
[dependencies.libimagutil]
|
[dependencies.libimagerror]
|
||||||
path = "../libimagutil"
|
path = "../libimagerror"
|
||||||
|
|
||||||
[dependencies.libimagentrytag]
|
[dependencies.libimagentrytag]
|
||||||
path = "../libimagentrytag"
|
path = "../libimagentrytag"
|
||||||
|
|
|
@ -7,20 +7,19 @@ extern crate toml;
|
||||||
extern crate libimagstore;
|
extern crate libimagstore;
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
extern crate libimagentrytag;
|
extern crate libimagentrytag;
|
||||||
extern crate libimagutil;
|
extern crate libimagerror;
|
||||||
|
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagentrytag::tagable::Tagable;
|
use libimagentrytag::tagable::Tagable;
|
||||||
use libimagstore::storeid::build_entry_path;
|
use libimagstore::storeid::build_entry_path;
|
||||||
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
mod ui;
|
mod ui;
|
||||||
|
|
||||||
use ui::build_ui;
|
use ui::build_ui;
|
||||||
|
|
||||||
use libimagutil::trace::trace_error;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let name = "imag-store";
|
let name = "imag-store";
|
||||||
let version = &version!()[..];
|
let version = &version!()[..];
|
||||||
|
|
|
@ -18,9 +18,6 @@ path = "../libimagstore"
|
||||||
[dependencies.libimagrt]
|
[dependencies.libimagrt]
|
||||||
path = "../libimagrt"
|
path = "../libimagrt"
|
||||||
|
|
||||||
[dependencies.libimagutil]
|
|
||||||
path = "../libimagutil"
|
|
||||||
|
|
||||||
[dependencies.libimagerror]
|
[dependencies.libimagerror]
|
||||||
path = "../libimagerror"
|
path = "../libimagerror"
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ extern crate toml;
|
||||||
|
|
||||||
extern crate libimagrt;
|
extern crate libimagrt;
|
||||||
extern crate libimagstore;
|
extern crate libimagstore;
|
||||||
extern crate libimagutil;
|
|
||||||
#[macro_use] extern crate libimagerror;
|
#[macro_use] extern crate libimagerror;
|
||||||
|
|
||||||
use std::result::Result as RResult;
|
use std::result::Result as RResult;
|
||||||
|
@ -30,7 +29,7 @@ use std::process::exit;
|
||||||
|
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
mod ui;
|
mod ui;
|
||||||
|
|
|
@ -4,3 +4,5 @@ version = "0.1.0"
|
||||||
authors = ["Matthias Beyer <mail@beyermatthias.de>"]
|
authors = ["Matthias Beyer <mail@beyermatthias.de>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
log = "0.3"
|
||||||
|
ansi_term = "0.7"
|
||||||
|
|
|
@ -1 +1,5 @@
|
||||||
|
#[macro_use] extern crate log;
|
||||||
|
extern crate ansi_term;
|
||||||
|
|
||||||
pub mod error_gen;
|
pub mod error_gen;
|
||||||
|
pub mod trace;
|
||||||
|
|
|
@ -42,8 +42,8 @@ impl<'a> Runtime<'a> {
|
||||||
use libimagstore::hook::position::HookPosition;
|
use libimagstore::hook::position::HookPosition;
|
||||||
use libimagstore::error::StoreErrorKind;
|
use libimagstore::error::StoreErrorKind;
|
||||||
use libimagstorestdhook::debug::DebugHook;
|
use libimagstorestdhook::debug::DebugHook;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
use libimagutil::trace::trace_error_dbg;
|
use libimagerror::trace::trace_error_dbg;
|
||||||
|
|
||||||
use configuration::error::ConfigErrorKind;
|
use configuration::error::ConfigErrorKind;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,6 @@ path = "../libimagstore"
|
||||||
[dependencies.libimagentrylink]
|
[dependencies.libimagentrylink]
|
||||||
path = "../libimagentrylink"
|
path = "../libimagentrylink"
|
||||||
|
|
||||||
[dependencies.libimagutil]
|
[dependencies.libimagerror]
|
||||||
path = "../libimagutil"
|
path = "../libimagerror"
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ extern crate fs2;
|
||||||
|
|
||||||
extern crate libimagstore;
|
extern crate libimagstore;
|
||||||
extern crate libimagentrylink;
|
extern crate libimagentrylink;
|
||||||
extern crate libimagutil;
|
extern crate libimagerror;
|
||||||
|
|
||||||
pub mod debug;
|
pub mod debug;
|
||||||
pub mod flock;
|
pub mod flock;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use libimagstore::hook::accessor::NonMutableHookDataAccessor;
|
||||||
use libimagstore::hook::result::HookResult;
|
use libimagstore::hook::result::HookResult;
|
||||||
use libimagstore::store::FileLockEntry;
|
use libimagstore::store::FileLockEntry;
|
||||||
use libimagentrylink::internal::InternalLinker;
|
use libimagentrylink::internal::InternalLinker;
|
||||||
use libimagutil::trace::trace_error;
|
use libimagerror::trace::trace_error;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct LinkedEntriesExistHook {
|
pub struct LinkedEntriesExistHook {
|
||||||
|
|
|
@ -7,5 +7,4 @@ authors = ["Matthias Beyer <mail@beyermatthias.de>"]
|
||||||
lazy_static = "0.1.15"
|
lazy_static = "0.1.15"
|
||||||
log = "0.3"
|
log = "0.3"
|
||||||
regex = "0.1"
|
regex = "0.1"
|
||||||
ansi_term = "0.7"
|
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,7 @@
|
||||||
#[macro_use] extern crate lazy_static;
|
#[macro_use] extern crate lazy_static;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
extern crate regex;
|
extern crate regex;
|
||||||
extern crate ansi_term;
|
|
||||||
|
|
||||||
pub mod ismatch;
|
pub mod ismatch;
|
||||||
pub mod key_value_split;
|
pub mod key_value_split;
|
||||||
pub mod trace;
|
|
||||||
pub mod variants;
|
pub mod variants;
|
||||||
|
|
Loading…
Reference in a new issue