> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# logdna/logdna

Send CircleCI Events to LogDNA upon Build

## Commands

### enablek8slogging

Enable Kubernetes Logging via LogDNA Agent

| Parameter | Type | Default | Description |
|---|---|---|---|
| `logdna-key` | env_var_name | LOGDNA_KEY | The LogDNA Ingestion Key |

### notify

Notify LogDNA of the Build Event via cURL

| Parameter | Type | Default | Description |
|---|---|---|---|
| `app` | string | ${CIRCLE_JOB} | Custom App Name |
| `baseurl` | string | https://logs.logdna.com/logs/ingest | Custom LogDNA Ingestion URL |
| `hostname` | string | ${CIRCLE_PROJECT_REPONAME} | Custom Hostname |
| `logdna-key` | env_var_name | LOGDNA_KEY | The LogDNA Ingestion Key |
| `tags` | string | circleci | Comma-Separated List of Tags |

### report

Report the Status of the Build via cURL

| Parameter | Type | Default | Description |
|---|---|---|---|
| `app` | string | ${CIRCLE_JOB} | Custom App Name |
| `baseurl` | string | https://logs.logdna.com/logs/ingest | Custom LogDNA Ingestion URL |
| `failure` | string | false | Whether the Build has Failed |
| `hostname` | string | ${CIRCLE_PROJECT_REPONAME} | Custom Hostname |
| `logdna-key` | env_var_name | LOGDNA_KEY | The LogDNA Ingestion Key |
| `tags` | string | circleci | Comma-Separated List of Tags |

## Examples

### simple_example

A very simple example of a CircleCI Config using LogDNA Orb.


```yaml
jobs:
  build:
    environment:
      LOGDNA_KEY: Your LogDNA Ingestion Key Here
    machine: true
    steps:
      - checkout
      - logdna/notify
      - logdna/enablek8slogging
      - run:
          command: echo 'export FAILURE=true' >> ${BASH_ENV}
          name: Export Failure
          when: on_fail
      - run:
          command: echo 'export FAILURE=false' >> ${BASH_ENV}
          name: Export Success
          when: on_success
      - logdna/report:
          failure: ${FAILURE}
orbs:
  logdna: logdna/logdna@0.0.1
version: 2.1
```