chore: set tracing log to debug level

This commit is contained in:
nathan 2023-03-01 18:45:52 +08:00
parent c74308999d
commit fd135fb664
5 changed files with 20 additions and 22 deletions

View File

@ -1,3 +1,3 @@
fn main() { fn main() {
tauri_build::build() tauri_build::build()
} }

View File

@ -1,21 +1,22 @@
use flowy_core::{get_client_server_configuration, AppFlowyCore, AppFlowyCoreConfig}; use flowy_core::{get_client_server_configuration, AppFlowyCore, AppFlowyCoreConfig};
pub fn init_flowy_core() -> AppFlowyCore { pub fn init_flowy_core() -> AppFlowyCore {
let config_json = include_str!("../tauri.conf.json"); let config_json = include_str!("../tauri.conf.json");
let config: tauri_utils::config::Config = serde_json::from_str(config_json).unwrap(); let config: tauri_utils::config::Config = serde_json::from_str(config_json).unwrap();
let mut data_path = tauri::api::path::app_local_data_dir(&config).unwrap(); let mut data_path = tauri::api::path::app_local_data_dir(&config).unwrap();
if cfg!(debug_assertions) { if cfg!(debug_assertions) {
data_path.push("dev"); data_path.push("dev");
} }
data_path.push("data"); data_path.push("data");
let server_config = get_client_server_configuration().unwrap(); std::env::set_var("RUST_LOG", "debug");
let config = AppFlowyCoreConfig::new( let server_config = get_client_server_configuration().unwrap();
data_path.to_str().unwrap(), let config = AppFlowyCoreConfig::new(
"AppFlowy".to_string(), data_path.to_str().unwrap(),
server_config, "AppFlowy".to_string(),
) server_config,
.log_filter("trace", vec!["appflowy_tauri".to_string()]); )
AppFlowyCore::new(config) .log_filter("trace", vec!["appflowy_tauri".to_string()]);
AppFlowyCore::new(config)
} }

View File

@ -60,11 +60,10 @@
"windows": [ "windows": [
{ {
"fullscreen": false, "fullscreen": false,
"height": 1000, "height": 1200,
"resizable": true, "resizable": true,
"title": "AppFlowy", "title": "AppFlowy",
"width": 1200, "width": 1200
"transparent": true
} }
] ]
} }

View File

@ -11,11 +11,9 @@ import {
makeSingleSelectCellController, makeSingleSelectCellController,
openTestDatabase, openTestDatabase,
} from './DatabaseTestHelper'; } from './DatabaseTestHelper';
import assert from 'assert';
import { SelectOptionBackendService } from '../../stores/effects/database/cell/select_option_bd_svc'; import { SelectOptionBackendService } from '../../stores/effects/database/cell/select_option_bd_svc';
import { TypeOptionController } from '../../stores/effects/database/field/type_option/type_option_controller'; import { TypeOptionController } from '../../stores/effects/database/field/type_option/type_option_controller';
import { None, Some } from 'ts-results'; import { None, Some } from 'ts-results';
import { TypeOptionBackendService } from '../../stores/effects/database/field/type_option/type_option_bd_svc';
import { RowBackendService } from '../../stores/effects/database/row/row_bd_svc'; import { RowBackendService } from '../../stores/effects/database/row/row_bd_svc';
export const TestCreateGrid = () => { export const TestCreateGrid = () => {

View File

@ -27,7 +27,7 @@ export async function {{ event_func_name }}(): Promise<Result<{{ output_deserial
console.log({{ event_func_name }}.name, object); console.log({{ event_func_name }}.name, object);
return Ok(object); return Ok(object);
{%- else %} {%- else %}
return Ok.EMPTYDatabaseNotification; return Ok.EMPTY;
{%- endif %} {%- endif %}
} else { } else {
let error = {{ error_deserializer }}.deserializeBinary(result.payload); let error = {{ error_deserializer }}.deserializeBinary(result.payload);