# Is there a way to instantiate the Parse Logger outside of the context of the Parse Server?

**URL:** <https://community.parseplatform.org/t/is-there-a-way-to-instantiate-the-parse-logger-outside-of-the-context-of-the-parse-server/2248>\
**Category:** Parse Server 📡\
**Created:** [December 3, 2021, 10:16am UTC](https://community.parseplatform.org/t/is-there-a-way-to-instantiate-the-parse-logger-outside-of-the-context-of-the-parse-server/2248 "2021-12-03T10:16:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RamBoFe](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rambofe/32/957_2.png) [@RamBoFe](https://community.parseplatform.org/u/RamBoFe)\
**Post date:** [December 3, 2021, 10:16am UTC](https://community.parseplatform.org/t/is-there-a-way-to-instantiate-the-parse-logger-outside-of-the-context-of-the-parse-server/2248/1 "2021-12-03T10:16:01Z")

</div>

Hi all,

I have an Express route parallel to Parse Server in my backend and I would like to retrieve the Parse Logger so that I can use it in my Express route. So is there a way to recover this Logger and use it in my route ?

Thank you.

---

<div class="post-metadata">

**Author:** ![davimacedo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/davimacedo/32/316_2.png) [@davimacedo](https://community.parseplatform.org/u/davimacedo)\
**Post date:** [December 3, 2021, 7:56pm UTC](https://community.parseplatform.org/t/is-there-a-way-to-instantiate-the-parse-logger-outside-of-the-context-of-the-parse-server/2248/2 "2021-12-03T19:56:52Z")

</div>

Something like this should do what you need:

```auto
import logger from 'parse-server/lib/logger';
logger.warn('some warning');

```

---

<div class="post-metadata">

**Author:** ![RamBoFe](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rambofe/32/957_2.png) [@RamBoFe](https://community.parseplatform.org/u/RamBoFe)\
**Post date:** [December 4, 2021, 10:18pm UTC](https://community.parseplatform.org/t/is-there-a-way-to-instantiate-the-parse-logger-outside-of-the-context-of-the-parse-server/2248/3 "2021-12-04T22:18:34Z")

</div>

Thank you ! That works like a charm !

Howerver i’m a little ashamed … 😌 I thought it was more complicated than that… Thanks again !

---

<div class="post-metadata">

**Author:** ![davimacedo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/davimacedo/32/316_2.png) [@davimacedo](https://community.parseplatform.org/u/davimacedo)\
**Post date:** [December 5, 2021, 11:15pm UTC](https://community.parseplatform.org/t/is-there-a-way-to-instantiate-the-parse-logger-outside-of-the-context-of-the-parse-server/2248/4 "2021-12-05T23:15:47Z")

</div>

No problem at all 🙂

---

<div class="post-metadata">

**Author:** ![enodev](https://community.parseplatform.org/user_avatar/community.parseplatform.org/enodev/32/61_2.png) [@enodev](https://community.parseplatform.org/u/enodev)\
**Post date:** [September 4, 2024, 10:16am UTC](https://community.parseplatform.org/t/is-there-a-way-to-instantiate-the-parse-logger-outside-of-the-context-of-the-parse-server/2248/5 "2024-09-04T10:16:33Z")

</div>

@davimacedo What would be the updated instructions to obtain a built in and initialised parse logger for recent parse server releases? The example above does not seem to work when importing from ESM module. And updated code does not seem to log anything anywhere.

```auto
import logger from 'parse-server/lib/logger';
logger.warn('some warning');

```

Produces the error:

```plaintext
An uncaught exception occurred: logger.info is not a function
Stack Trace: TypeError: logger.info is not a function

```

---

<div class="post-metadata">

**Author:** ![enodev](https://community.parseplatform.org/user_avatar/community.parseplatform.org/enodev/32/61_2.png) [@enodev](https://community.parseplatform.org/u/enodev)\
**Post date:** [September 4, 2024, 10:39am UTC](https://community.parseplatform.org/t/is-there-a-way-to-instantiate-the-parse-logger-outside-of-the-context-of-the-parse-server/2248/6 "2024-09-04T10:39:57Z")

</div>

The new syntax that seems to compile fine is:

```auto
import pkg from 'parse-server/lib/logger.js';
const { logger } = pkg;
logger.info("xxx");

```

But no matter when in the lifecycle of the app I do it, logger does not produce anything anywhere.

Help needed, thanks,  
Martin
