# Logging

**URL:** https://forum.mautic.org/t/logging/6008
**Category:** Development
**Created:** [March 4, 2016, 3:34pm UTC](https://forum.mautic.org/t/logging/6008 "2016-03-04T15:34:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rstather](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@rstather](https://forum.mautic.org/u/rstather)
#### Post date: [March 4, 2016, 3:34pm UTC](https://forum.mautic.org/t/logging/6008/1 "2016-03-04T15:34:27Z")

</div>

Hi. How do I write to the mautic log file from php scripts? Just can’t seem to find any docs on how to do this?  
  
  
  
Thanks  
  
  
  
Russell

---

<div class="post-metadata">

### Author: ![rstather](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@rstather](https://forum.mautic.org/u/rstather)
#### Post date: [March 4, 2016, 3:34pm UTC](https://forum.mautic.org/t/logging/6008/2 "2016-03-04T15:34:27Z")

</div>

Hi. How do I write to the mautic log file from php scripts? Just can’t seem to find any docs on how to do this?

Thanks

Russell

---

<div class="post-metadata">

### Author: ![johnyoung](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/johnyoung/32/64_2.png) [@johnyoung](https://forum.mautic.org/u/johnyoung)
#### Post date: [March 4, 2016, 7:50pm UTC](https://forum.mautic.org/t/logging/6008/3 "2016-03-04T19:50:28Z")

</div>

I had this question as well. What I discovered is that Mautic logging is based on the [Symfony Monolog Bundle](http://symfony.com/doc/current/cookbook/logging/monolog.html)

If you have a factory handle:

```auto
$this->factory->getLogger()->log('error', 'your message here');
```

where ‘error’ is your log level (I think info, debug, critical are also available)
