mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-05 15:22:29 -05:00
switch from log to tracing
I think this is a big improvement in readability. I removed the `lnav` config, which is a little sad, but I don't think it supports this structured logging format well. Still seems worthwhile on balance.
This commit is contained in:
@@ -8,11 +8,11 @@
|
||||
|
||||
use crate::db;
|
||||
use failure::{bail, Error};
|
||||
use log::info;
|
||||
use nix::NixPath;
|
||||
use rusqlite::params;
|
||||
use std::ffi::CStr;
|
||||
use std::io::Write;
|
||||
use tracing::info;
|
||||
use uuid::Uuid;
|
||||
|
||||
mod v0_to_v1;
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
use crate::db;
|
||||
use crate::recording;
|
||||
use failure::Error;
|
||||
use log::warn;
|
||||
use rusqlite::{named_params, params};
|
||||
use std::collections::HashMap;
|
||||
use tracing::warn;
|
||||
|
||||
pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error> {
|
||||
// These create statements match the schema.sql when version 1 was the latest.
|
||||
|
||||
@@ -10,13 +10,13 @@ use crate::db::SqlUuid;
|
||||
use crate::{dir, schema};
|
||||
use cstr::cstr;
|
||||
use failure::{bail, Error, Fail};
|
||||
use log::info;
|
||||
use nix::fcntl::{FlockArg, OFlag};
|
||||
use nix::sys::stat::Mode;
|
||||
use protobuf::Message;
|
||||
use rusqlite::params;
|
||||
use std::io::{Read, Write};
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use tracing::info;
|
||||
use uuid::Uuid;
|
||||
|
||||
const FIXED_DIR_META_LEN: usize = 512;
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
/// Upgrades a version 6 schema to a version 7 schema.
|
||||
use failure::{format_err, Error, ResultExt};
|
||||
use fnv::FnvHashMap;
|
||||
use log::debug;
|
||||
use rusqlite::{named_params, params};
|
||||
use std::{convert::TryFrom, path::PathBuf};
|
||||
use tracing::debug;
|
||||
use url::Url;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user