Posting to /logs/ingest will send your log statements to the LogDNA log viewer

📘

Service Limits

For more information about service limits on ingestion, such as body and message size, depth of nested fields, etc., refer to our documentation.

Post it

  1. Log into your LogDNA account and add readme.io to your whitelisted domains here.
  2. Click the Test in the API Explorer button at the bottom of the page
  3. Hit the green key icon and enter your LogDNA Ingestion Key
  4. Copy and paste the example JSON below into the Body Content text field. Be sure to replace INSERT_UNIX_TIMESTAMP with the unix timestamp of the log line, preferably in milliseconds. Then click the green Try It! button.

If you sign in to the LogDNA log viewer, you'll now see the log line "This is an awesome log statement" live in the log viewer!

{ 
  "lines": [ 
    { 
      "timestamp": INSERT_UNIX_TIMESTAMP, 
      "line":"This is an awesome log statement", 
      "app":"myapp",
      "level": "INFO",
      "meta": {
        "customfield": {
          "nestedfield": "nestedvalue"
        }
      }
    }
  ] 
}

Curl it

If you like the good 'ol fashioned terminal, you can use the curl statement instead, but be sure to replace INSERT_INGESTION_KEY with your LogDNA Ingestion Key and INSERT_UNIX_TIMESTAMP with the timestamp of the log line, preferably in milliseconds.

Tweak it

In addition to basic auth, we also support an HTTP query string with the format, &apikey=your-ingestion-key as well as a header token with the format apikey:your-ingestion-key. While we appreciate thoroughness, please do not use more than one method of authentication per request! There is also a maximum payload size of 10 MB.

Metadata

Meta is a field reserved for custom information associated with a log line. To add metadata to an API call, specify the meta field under the lines object. Metadata can be viewed inside that line's context.

WARNING: If inconsistent value types are used, that line's metadata, will not be parsed. For example, if a line is passed with a meta object, such as meta.myfield of type String, any subsequent lines with meta.myfield must have a String as the value type for meta.myfield.

Language
Authentication
Query
Click Try It! to start a request and see the response here!