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