瀏覽代碼

chore: set tracing log to debug level

nathan 2 年之前
父節點
當前提交
fd135fb664

+ 1 - 1
frontend/appflowy_tauri/src-tauri/build.rs

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

+ 16 - 15
frontend/appflowy_tauri/src-tauri/src/init.rs

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

+ 2 - 3
frontend/appflowy_tauri/src-tauri/tauri.conf.json

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

+ 0 - 2
frontend/appflowy_tauri/src/appflowy_app/components/TestApiButton/TestGrid.tsx

@@ -11,11 +11,9 @@ import {
   makeSingleSelectCellController,
   openTestDatabase,
 } from './DatabaseTestHelper';
-import assert from 'assert';
 import { SelectOptionBackendService } from '../../stores/effects/database/cell/select_option_bd_svc';
 import { TypeOptionController } from '../../stores/effects/database/field/type_option/type_option_controller';
 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';
 
 export const TestCreateGrid = () => {

+ 1 - 1
frontend/rust-lib/flowy-codegen/src/ts_event/event_template.tera

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