Message String | JSON | Object

The Log Message is the core piece of data in each log entry, containing the specific details or information you want to track. In LogHub, the message is highly flexible and can be represented as a string, JSON, or an object. This versatility allows you to log a wide range of information, from simple status updates to complex structured data.

Flexible Data Formats

The log message can be sent in various formats, depending on what best fits your use case:

  • String: A simple text message.
    Example: “User successfully created an account.”
  • JSON: Structured data with key-value pairs for more detailed logging.
    Example: {“user_id”: 123, “action”: “login”, “status”: “success”}
  • Object: Complex data structures, which can contain nested information and provide more context about the event.
    Example: {“process”: {“id”: 456, “status”: “completed”}, “runtime”: {“duration”: “45s”}}

By utilizing the flexibility of Log Message, you can log detailed and meaningful information that is not only stored but also easily searchable within LogHub. This makes troubleshooting, monitoring, and auditing processes much more efficient, as you can always find the exact logs you’re looking for based on the content of the messages.