Momen Docs
Go to Momen
  • Get Started
    • Introduction
    • Quick Start
    • Software Development Process
    • Editor Overview
  • Changelog
    • Latest Product Update
  • Build UI
    • Pages
    • Components
    • Canvas
    • Layout
    • Component - Display
    • Component - Input
    • Component - View
    • Component - List
    • Component - Tab View
    • Component - Select View
    • Component - Conditional View
    • Component - Others
    • Component - Map
    • Custom Component
  • Data
    • Overview
    • Data Model and Database
    • API
    • Variable
    • Parameter
    • Formula and Conditions
  • Actions
    • Overview
    • Request
    • Navigation
    • Actionflow
      • Custom Code
      • Database Trigger
    • AI
      • AI Data Model
      • AI Point
      • Vector Data Storage and Sorting
    • User Actions
    • Component Management
    • App and Page Management
    • Toast Notifications & Modal
    • Payment
    • SSO
    • Share
    • Location
    • File Management
    • QR Code
    • Clipboard
    • Conditional
    • Loop
  • Release and Growth
    • Publish Application
    • Upgrade Project
    • Multiple Clients
    • Permission
    • Log Service
    • SEO
    • Hosting Files
  • My Account and Community
    • My Wallet
    • Promoting Momen
    • Code Component
    • Collaboration
  • Debugging
    • How to Debug in Momen
    • Request Error Reference
  • Tutorial
    • How to Build an AI Needs Analysis Project?
    • How to Set Up Payment with Stripe Plugin?
    • How to Embed an Iframe Component into Your Momen Project?
    • How to Build Your Login Page?
    • How to Convert Momen App to Native Mobile App?
    • How to Build a CMS (MVP Version) in Hours?
    • How to Set a Countdown Timer When Sending a Verification Code
  • Template
    • AI Mental Health Assistant
    • Angry Dietitian
    • AI Help Center
    • AI Knowledge Base
    • SaaS Corporate Site
    • Blog
    • AI Feedback Tool
    • Feedback Tool, a Nod to Canny
    • Portfolio
    • Online Courses, a Nod to Udemy
    • Mobile Auto Repair AI Scheduler
Powered by GitBook
On this page
  • Access Log Service
  • Query Syntax
  • Log Classification Overview
  1. Release and Growth

Log Service

The log service improves system observability, allowing developers to quickly identify issues and enhance their development efficiency.

PreviousPermissionNextSEO

Last updated 1 day ago

Scope: The log service aims to capture all key information within the system. Currently, the scope of the log service ranges from actionflow, database access, AI, API, trigger, gateway, deployment, and publishing to GraphQL-related records.

Storage Capacity: The log service offers varying storage capacities based on the project version, measured in days:

  • Free Plan: 1 day

  • Basic Plan: 7 days

  • Pro Plan: 30 days

Access Log Service

  1. Access the log service from the "Log Service" section on the project details page.

  1. Utilize the following features for convenient log viewing:

  • Log Classification: Quickly view logs by category.

  • Query Statement Settings: Define time ranges and levels, and customize query syntax for precise log retrieval.

  • Bar Chart: Visual representation of log statistics; click the chart to set time ranges.

  • Log Details: Access detailed information; click on field values to add them to your query.

Query Syntax

The log service offers efficient query syntax for flexible and rapid log searches.

  1. Keyword Query: Enter a keyword to find logs containing that term.

    • Example: To find all requests related to the "account" table:

      account
  2. Field Query: Specify field values for targeted queries.

    • Example: To find logs where requestMethod is POST:

      requestMethod: POST

    For text fields, wildcards (*) enable fuzzy searches.

    • Example: To find logs with traceId including 20241024:

      traceId: 20241024*

    Numeric fields can support range queries.

    • Example: To find logs with responseSize between 5000 and 10000:

      responseSize: [5000 to 10000]
  3. Combined Conditional Queries: Use operators like and, or to create complex queries.

    • Example: To find all logs related to account with status 200:

      account and status: 200
  4. Multi-Level Queries: For fields that exist at multiple levels, provide the complete path.

    • Example: To find logs where the field query in requestBody contains mutation:

      requestBody.query: mutation*

Log Classification Overview

Actionflow

The Log Service records the running status of each node in the actionflow in detail:

  • Each node generates two logs: a log when the node starts and a log when the node ends.

  • A log is also generated when Context.log() is called within a code block.

  • Explanation of node log fields:

Field

Description

traceId

Used for event tracking queries

nodeType

Type of the node

nodeName

Name of the node

version

Version of the actionflow

input

Input of the node, including all referenceable data

output

Result of the node's execution

startAt

Start time of the node

endAt

End time of the node

  • Types of nodes in logs:

Node

Type in Logs

Input

FLOW_START

Query Record

QUERY_RECORD

Update Record

UPDATE_RECORD

Insert Record

INSERT_RECORD

Delete Record

DELETE_RECORD

Code Block

CUSTOM_CODE

Add Role

ADD_ROLE_TO_ACCOUNT

Remove Role

REMOVE_ROLE_FROM_ACCOUNT

Update Global Variables

UPDATE_GLOBAL_VARIABLES

Branch Start

BRANCH_SEPARATION

Branch End

BRANCH_MERGE

Database Operations

This category records all operations (add, delete, modify) on the database, including the following:

  1. Trigger method (frontend request, actionflow, AI, etc.).

  2. Detailed content of the operation.

AI

Records the complete process of AI conversations, including model type, message details, etc.

API

Records details of API requests, including the request Header, Body, etc.

Trigger

Records the time, type, and other information of trigger activations.

Gateway

A gateway is an intermediate device connecting different networks, responsible for forwarding data to enable smooth communication between different systems. On the Momen platform, the following requests pass through the gateway:

  1. Requests sent from the frontend page to the backend.

  2. Requests received through Callback.

Therefore, logs in this category include most requests, including database CRUD operations, API, AI, etc. However, due to system limitations, only outgoing requests can be viewed in the gateway logs, and the results of the requests cannot be viewed.

<img src="../.gitbook/assets/截屏2024-10-31 18.11.48.png"" width="100%">

Deployment and Release

Records details of each backend release, pre-release, and release.

GraphQL

The backend API of Momen uses the GraphQL query language, and all backend requests can be seen in this category. For more information about GraphQL, you can visit its official website:

GraphQL | A query language for your API