updates to how logging works
This commit is contained in:
parent
c7761b9787
commit
479c22087f
5 changed files with 14 additions and 3 deletions
|
@ -124,7 +124,7 @@ int main(int argc, char *argv[])
|
|||
QCoreApplication::setOrganizationName(QStringLiteral("lumina"));
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("tfcconnection.org"));
|
||||
QCoreApplication::setApplicationName(QStringLiteral("lumina"));
|
||||
qSetMessagePattern("[%{type} %{time h:m:s ap}: %{function} in %{file}]: %{message}\n");
|
||||
qSetMessagePattern("%{category}: %{time h:m:s ap} %{type} %{function}: %{message}\n %{file}");
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
QIcon::setFallbackThemeName("breeze");
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::pin::Pin;
|
|||
|
||||
use time::macros::format_description;
|
||||
use tokio::runtime::Runtime;
|
||||
use tracing::{debug, info};
|
||||
use tracing::{debug, info, instrument::WithSubscriber};
|
||||
use tracing_subscriber::{
|
||||
fmt::{self, time::LocalTime},
|
||||
EnvFilter,
|
||||
|
@ -102,11 +102,16 @@ impl utilities::Utils {
|
|||
}
|
||||
|
||||
pub fn setup() {
|
||||
let timer = tracing_subscriber::fmt::time::ChronoLocal::new(
|
||||
"%Y-%m-%d_%I:%M:%S%.6f %P".to_owned(),
|
||||
);
|
||||
tracing_subscriber::FmtSubscriber::builder()
|
||||
.pretty()
|
||||
.with_line_number(true)
|
||||
.with_level(true)
|
||||
.with_target(true)
|
||||
.with_env_filter(EnvFilter::from_default_env())
|
||||
.with_target(true)
|
||||
.with_timer(timer)
|
||||
.init();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue