---
# System prepended metadata

title: airaConnect logging 開關
tags: [airaConnect]

---

---
tags: airaConnect
---

### main
記錄主程式啟動、運行時發生的事情。

#### 系統發生未正確處理的錯誤時
error
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/main.ts?ref_type=heads#L6

#### 啟動 command / event handlers 時
目前沒有寫入 log
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/bootstrap.ts?ref_type=heads#L42

#### 啟動 Express 時
info
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/http.ts?ref_type=heads#L61

#### 註冊各模組的路由時
目前沒有寫入 log
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/http.ts?ref_type=heads#L45-L58

#### 啟動 Mongo Collection Watchers 時
info
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/mongo.ts?ref_type=heads#L71

#### 連線到匣道器時
info
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/mqttClients.ts?ref_type=heads#L26
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/mqttClients.ts?ref_type=heads#L109

error
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/mqttClients.ts?ref_type=heads#L28
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/mqttClients.ts?ref_type=heads#L83
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/mqttClients.ts?ref_type=heads#L88
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/mqttClients.ts?ref_type=heads#L103
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/mqttClients.ts?ref_type=heads#L111

#### 接收 TCP Push Request 時
error
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/tcpServers.ts?ref_type=heads#L49
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/tcpServers.ts?ref_type=heads#L67
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/utils/config/tcpServers.ts?ref_type=heads#L76

## 後台管理員帳號 CRUD

### onCreatingAdministrator/*
目前沒有寫入 log

### onDeletingAdministrators/*
目前沒有寫入 log

### onUpdatingAdministrator/*
目前沒有寫入 log

### onListingAdministrators/*
目前沒有寫入 log

## 通知規則 CRUD
### onCreatingAlertPolicy/*
目前沒有寫入 log

### onDeletingAlertPolicies/*
目前沒有寫入 log

### onUpdatingAlertPolicy/*
目前沒有寫入 log

### onListingAlertPolicies/*
目前沒有寫入 log

## 告警（System Notification） CRUD
### onCreatingAlert/*
目前沒有寫入 log

### onDeletingAlerts/*
目前沒有寫入 log

### onUpdatingAlert/*
目前沒有寫入 log

### onListingAlerts/*
目前沒有寫入 log

## 通訊設備、匣道器 CRUD
### onCreatingCommunicationEquipment/*
目前沒有寫入 log
### onDeletingCommunicationEquipments/*
目前沒有寫入 log
### onUpdatingCommunicationEquipment/*
目前沒有寫入 log
### onListingCommunicationEquipments/*
目前沒有寫入 log

## 設備群組 CRUD
### onCreatingDeviceGroup/*
目前沒有寫入 log
### onDeletingDeviceGroups/*
目前沒有寫入 log
### onUpdatingDeviceGroup/*
目前沒有寫入 log
### onListingDeviceGroups/*
目前沒有寫入 log

## 設備 CRUD
### onCreatingDevice/*
目前沒有寫入 log
### onDeletingDevices/*
目前沒有寫入 log
### onUpdatingDevice/*
目前沒有寫入 log
### onListingDevices/*
目前沒有寫入 log

## 設備類型 CRUD
### onCreatingDeviceType/*
目前沒有寫入 log
### onDeletingDeviceTypes/*
目前沒有寫入 log
### onUpdatingDeviceType/*
目前沒有寫入 log
### onListingDeviceTypes/*
目前沒有寫入 log

## 環控儀表板配置 CRUD
### onCreatingEnvironmentalMonitoringPannelConfiguration/*
目前沒有寫入 log
### onDeletingEnvironmentalMonitoringPannelConfigurations/*
目前沒有寫入 log
### onUpdatingEnvironmentalMonitoringPannelConfiguration/*
目前沒有寫入 log
### onListingEnvironmentalMonitoringPannelConfigurations/*
目前沒有寫入 log

## 地圖 CRUD
### onCreatingMap/*
目前沒有寫入 log
### onDeletingMaps/*
目前沒有寫入 log
### onUpdatingMap/*
目前沒有寫入 log
### onListingMaps/*
目前沒有寫入 log

## 工作日誌 CRUD
### onCreatingWorkJournal/*
目前沒有寫入 log
### onDeletingWorkJournals/*
目前沒有寫入 log
### onUpdatingWorkJournal/*
目前沒有寫入 log
### onListingWorkJournals/*
目前沒有寫入 log

## 身份驗證
### onRefreshingToken/*
目前沒有寫入 log

### onSigningIn/*
目前沒有寫入 log

## 嘗試解析資料時
### onRetrievingSevenInOneData/*
目前沒有寫入 log

## 解析得到資料時
### onMachineryDataReceived/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/DataReceiving/application/mutations/saveMachineryMessage.ts#L17
- 
### onSevenInOneDataReceived/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/DataReceiving/application/mutations/saveSevenInOneMessage.ts#L17

### onTemperatureAndHumidityDataReceived/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/DataReceiving/application/mutations/saveTemperatureAndHumidityMessage.ts#L17

### onAirQualityMessageReceived/*
目前不會執行到

### onMachineryMessageReceived/*
目前沒有寫入 log

## 更新報表時
### onRenewingHumidityStat/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/MetaProcessing/application/mutations/renewEnvironmentalStat.ts#L15

### onRenewingMachineryStat/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/MetaProcessing/application/mutations/renewMachineryStat.ts#L15

### onRenewingPm2Point5Stat/*, onRenewingPm10Stat/*, onRenewingTemperatureStat/*, onRenewingTemperatureStat/*, onRenewingWindSpeedStat/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/MetaProcessing/application/mutations/renewEnvironmentalStat.ts#L15

### onSevenInOneMessageReceived/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/MetaProcessing/application/mutations/renewWindSpeedStateSnapshot.ts#L27
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/MetaProcessing/application/mutations/renewPm10StateSnapshot.ts#L27
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/MetaProcessing/application/mutations/renewPm2Point5StateSnapshot.ts#L27

### onTemperatureAndHumidityMessageReceived/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/MetaProcessing/application/mutations/renewTemperatureStateSnapshot.ts#L27
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/MetaProcessing/application/mutations/renewTemperatureStateSnapshot.ts#L27

## 通訊設備、匣道器 heartbeat 時
### onHeartBeat/*
目前沒有寫入 log

## 收到任意 IOT 資料要透過 websocket 送往前端時
### onBroadcastingMessage/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Monitoring/application/mutations/broadcastMessage.ts#L64

## 告警前
### onNotifying/*
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/presentation/http/onNotifying.ts#L28
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/presentation/http/onNotifying.ts#L31
error
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/presentation/http/onNotifying.ts#L34

## 告警時（System Notification）
### onTriggeringAlert/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Monitoring/application/mutations/triggerAlert.ts#L15

## 更新設備狀態時
### onDeviceRenewed/*
目前沒有寫入 log

## 檢查機具狀態是否符合監控條件時
### onMachineryStatRenewed/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Monitoring/application/mutations/monitiorMachineOrGroup.ts#L21
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Monitoring/application/mutations/monitiorMachineOrGroup.ts#L22

## 發送各類通知時
### onSendingNotification/*
debug
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/application/mutations/sendHttpNotifcation.ts?ref_type=heads#L50
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/application/mutations/sendHttpNotifcation.ts?ref_type=heads#L65
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/application/mutations/sendHttpNotifcation.ts?ref_type=heads#L77
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/application/mutations/sendIoNotification.ts?ref_type=heads#L36
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/application/mutations/sendLineNotification.ts?ref_type=heads#L28
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/application/mutations/sendMailNotification.ts?ref_type=heads#L34
- https://gitlab.com/z411392/new-aira-connect/-/blob/main/src/modules/Notifying/application/mutations/sendSystemNotification.ts?ref_type=heads#L39

## 讀取機具原始時
### onListingMachineryMessages/*
目前沒有寫入 log

## 讀取機具報表時（按時間區間）
### onListingMachineryStatsByInterval/*
目前沒有寫入 log

## 讀取機具月報表時
### onListingMachineryStatsByMonth/*
目前沒有寫入 log

## 查詢系統版本資訊時
### onRequestingReleaseInfo/*
目前沒有寫入 log