# How to output errors to console? APM is only sending them to the server

**URL:** <https://discuss.elastic.co/t/how-to-output-errors-to-console-apm-is-only-sending-them-to-the-server/236102>\
**Category:** APM\
**Tags:** nodejs\
**Created:** [June 7, 2020, 6:58pm UTC](https://discuss.elastic.co/t/how-to-output-errors-to-console-apm-is-only-sending-them-to-the-server/236102 "2020-06-07T18:58:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ffknob](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ffknob/32/37008_2.png) [@ffknob](https://discuss.elastic.co/u/ffknob)\
**Post date:** [June 7, 2020, 6:58pm UTC](https://discuss.elastic.co/t/how-to-output-errors-to-console-apm-is-only-sending-them-to-the-server/236102/1 "2020-06-07T18:58:17Z")

</div>

Hello,

I'd like to print the errors to console (stdout, stderr) instead of only sending them to the APM server. Acctually what is happening now is that even compilation errors (Typescript) are being sent to the server, and in the console I only get:

```auto
[nodemon] 1.19.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /home/ffknob/Entwicklung/workspace/kadata/elastic-apm-demo/app/middleware/src/**/*
[nodemon] starting `ts-node src/app.ts`
Sending error to Elastic APM { id: '46ca64fa4e37cac7e70100cb3229f10d' }
[nodemon] app crashed - waiting for file changes before starting...

```

I have this in my Agent's start options:

```auto
logUncaughtExceptions: true

```

An this:

```auto
apm.addErrorFilter((payload: Payload) => console.log(payload));

```

But still no output in the console other than `Sending error to Elastic APM `.

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 28, 2020, 2:58pm UTC](https://discuss.elastic.co/t/how-to-output-errors-to-console-apm-is-only-sending-them-to-the-server/236102/2 "2020-06-28T14:58:17Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
