Log Event Types

A canonical list of logging events.

Meya logs a variety of events, including errors, warnings, and other useful information. The table below summarizes the built-in event types and what they mean.

EventDescription
bot.errorError. General errors encountered when running bots. This category will be refined into other categories in the future.
bot.pauseWarning. Indicates the bot will not respond to an event because the bot is not currently active.
component.invokeError, Warning, or Info. Provides information about a running custom component. Used for error messages related to running a custom component, and general information.
component.timeoutError. Indicates a custom component took too long to execute.
component.custom.<misc|*>Error, Warning, or Info. A developer-defined message stemming from a custom component using self.log(). If no type is provided, component.custom.misc is used.
development.component.deployError, Warning, or Info. Information about deploying a custom component after it's saved.
development.component.dependencies.deployError, Warning, or Info. Information about deploying Python dependencies after requirements.txt is saved.
development.github.syncError, Warning, or Info. Logs important information about syncing a bot from Github.
development.github.commitError, Warning, or Info. Logs important information about syncing a bot to Github.
development.github.autosyncError, Warning, or Info. Logs information about syncing a bot from Github using an automatic repository hook.
development.zip.importError, Warning, or Info. Logs information about syncing a bot from a zip file.
development.zip.exportError, Warning, or Info. Logs information about downloading a bot as a zip file.
flow.startLogs when a flow has started.
flow.transitionThe flow is transitioning to the next state. This will be logged at the end of each flow as well, since flows have a final hidden empty state.
flow.custom.<misc|*>Error, Warning, or Info. A developer-defined message stemming from a flow. If no type is provided, flow.custom.misc is used.
intent.chooseInfo. Information related to which intent was chosen based on a user message.
intent.nomatchWarning. Indicates that no intent could be found to process a user message.
intent.processError, Warning, or Info. Logs information related to considering an intent. If an error occurs during intent processing, it is skipped, and logs are important for insight into what happened.
misc
<component|flow>.custom.misc
Info. An uncategorized informational message. This is used for logs that don't (yet) fit other categories.
<send|receive>.<integration>.event
<send|receive>.<integration>.messageA message was sent to, or received from, the user or the bot.
<send|receive>.<integration>.button_clickThe user clicked a button.
<send|receive>.<integration>.typingThe user or bot is typing.
<send|receive>.<integration>.read_receiptThe user has read the bot's message.
<send|receive>.<integration>.deliveryThe message was delivered.
<send|receive>.<integration>.echo
<send|receive>.<integration>.payment
<send|receive>.<integration>.start_chatMeya Web only. The user has started a chat with the bot for the first time.
<send|receive>.<integration>.open_chatMeya Web only. The user has opened the chat widget.
<send|receive>.messenger.optinMessenger only.
<send|receive>.messenger.account_linkingMessenger only.
<send|receive>.messenger.pre_checkoutMessenger only.
<send|receive>.messenger.checkout_updateMessenger only.
<send|receive>.messenger.referralMessenger only.
<send|receive>.messenger.pass_thread_controlMessenger only.
system.echo.<send|receive>Info. Used internally for system status/latency checks.

Integration list

When searching logs using type:<send|receive>.<integration>.<event_type>, use the event form of the integration's name, as provided in the table below.

IntegrationEvent Form
Actions on Googlegoogle_actions
Facebook Messengermessenger
Intercomintercom
Kikkik
Layerlayer
Meya Test Chattest
Meya Webweb
Slackslack
Smoochsmooch
Telegramtelegram
Twiliotwilio
Twittertwitter
Webhookwebhook

Inserting custom log messages

In addition to the above list of built-in event types, you can create custom messages and log them within flows using the component.log component, setting the log properties in any built-in component, or inserting self.log() statements in your custom components.

Inserting log messages in a custom component

You can use self.log(<context>, type=<type>, status=<status>) to log events and messages. These messages will appear in the Logging tab.

from meya import Component


class LogComponent(Component):
    def start(self):
        text = "Hello, world! From inside a component in Messenger"
        status = "error"
        context = {
            "order": "chicken shawarma",
            "sauces": [
                    "garlic",
                    "hot"
                ]
        }
        self.log(context, type="food", status=status)
        print text
        message = self.create_message(text=text)
        return self.respond(message=message, action="next")

Go to the Logging tab to view your logged message.

735

How the custom log message appears in the Logging tab.

There are three properties you can set: status, type, and context.

PropertyDescription
statusOne of either info, error, or warning. You can search by this field. This also controls the icon symbology in the Logging tab on the left-hand side of the screen.
typeA user-defined string describing what the log message relates to.

You can filter results in the Logging tab using type:component.custom.<type> to show only this type of log message.
contextA user-defined dictionary containing any information you might find useful when troubleshooting.

Inserting log messages in a component

There are two ways to add a logged message to a component: the log property, and the log_text property.

📘

Using log and log_text at the same time

You should choose either log or log_text. Using both on the same component will result in two messages being logged.

The log property

Every built-in component has a property, log, which has three sub-properties: context, status, and type.

states:    
    start:
        component: meya.text_buttons
        properties:
            text: Dog or cat?
            output: button_click
            buttons:
                - text: "dog"
                  action: next
                - text: "cat"
                  action: next
                  
    log_state:
        component: meya.text
        properties:
            text: "You chose {{ flow.button_click }}"
        log:
            status: "info"
            type: "my_log"
            context: |
                text = {{ flow.value }}
                choice = {{ flow.button_click }}

Go to the Logging tab to view your logged message.

680

How the custom log message appears in the Logging tab.

The log property has three sub-properties you can set: status, type, and context.

PropertyDescription
statusOne of either info, error, or warning. You can search by this field. This also controls the icon symbology in the Logging tab on the left-hand side of the screen.Optional
Default: info
typeA user-defined string describing what the log message relates to.

You can filter results in the Logging tab using type:flow.custom.<type> to show only this type of log message.
Optional
Default: misc
contextA user-defined string containing any information you might find useful when troubleshooting.Optional

🚧

Set at least one property

While all three properties are optional, at least one must be set, or no message will be logged.

The log_text property

If you just want to print a message to the Logging tab and don't need the level of detail status, type, and context provide, use the log_text property.

states:                  
    log_state:
        component: meya.text
        properties:
            text: "text"
        log_text: "my log message"

Go to the Logging tab to view your logged message.

694

How the custom log message appears in the Logging tab.

📘

Event type for log_text

When using log_text, the event type is always flow.custom.misc. You can filter your logs to show only this message type using type:flow.custom.misc.

PropertyDescription
log_textA string that will appear in the logs.Required

Inserting log messages using the component.log component

You can also use the meya.log component to insert log messages.

states:
    start:
        component: meya.log
        properties:
            type: "my_log"
            status: "warning"
            context: "value = {{ flow.value }}"

Go to the Logging tab to view your logged message.

717

How the custom log message appears in the Logging tab.

There are three properties you can set: status, type, and context.

PropertyDescription
statusOne of either info, error, or warning. You can search based on this field. This also controls the icon symbology in the Logging tab on the left-hand side of the screen.Optional
Default: info
typeA user-defined string describing what the log message relates to.

You can filter results in the Logging tab using type:flow.custom.<type> to show only this type of log message.
Optional
Default: misc
contextA user-defined string containing any information you might find useful when troubleshooting.Optional

What’s Next

Continue exploring the Logging feature.