# FMOD\_DSP\_LOG

**URL:** https://qa.fmod.com/t/fmod-dsp-log/13045
**Category:** FMOD Studio
**Created:** [March 17, 2017, 11:37am UTC](https://qa.fmod.com/t/fmod-dsp-log/13045 "2017-03-17T11:37:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rory](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@rory](https://qa.fmod.com/u/rory)
#### Post date: [March 17, 2017, 11:37am UTC](https://qa.fmod.com/t/fmod-dsp-log/13045/1 "2017-03-17T11:37:27Z")

</div>

I see that a new logging function has been added to the DSP plugin API. However, I can’t find any mention of it in either the manual or the examples. Could I trouble one of you guys for a simple example of its use? Thanks.

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [March 20, 2017, 5:38am UTC](https://qa.fmod.com/t/fmod-dsp-log/13045/2 "2017-03-20T05:38:31Z")

</div>

From fmod\_dsp.h you have:

`typedef void (F_CALL *FMOD_DSP_LOG_FUNC)(FMOD_DEBUG_FLAGS level, const char *file, int line, const char *function, const char *string, ...);`

and you can access it easily with the helper macro at the bottom of fmod\_dsp.h

`#define FMOD_DSP_LOG(_state, _level, _location, _format, ...)`

- \_state is the FMOD\_DSP\_STATE given to all DSP callbacks
- \_level is the FMOD\_DEBUG\_FLAGS log level, i.e. FMOD\_DEBUG\_LEVEL\_ERROR, FMOD\_DEBUG\_LEVEL\_WARNING or FMOD\_DEBUG\_LEVEL\_LOG
- \_location is just a string used to identify where you are in your code, often I used the function name for this.
- \_format is a printf format string, and the following var\_args are the printf parameters

Hope that helps.

---

<div class="post-metadata">

### Author: ![rory](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@rory](https://qa.fmod.com/u/rory)
#### Post date: [March 20, 2017, 9:38am UTC](https://qa.fmod.com/t/fmod-dsp-log/13045/3 "2017-03-20T09:38:07Z")

</div>

> [@](#):
>
> From fmod\_dsp.h you have:
> 
> `typedef void (F_CALL *FMOD_DSP_LOG_FUNC)(FMOD_DEBUG_FLAGS level, const char *file, int line, const char *function, const char *string, ...);`
> 
> and you can access it easily with the helper macro at the bottom of fmod\_dsp.h
> 
> `#define FMOD_DSP_LOG(_state, _level, _location, _format, ...)`
> 
> - \_state is the FMOD\_DSP\_STATE given to all DSP callbacks
> - \_level is the FMOD\_DEBUG\_FLAGS log level, i.e. FMOD\_DEBUG\_LEVEL\_ERROR, FMOD\_DEBUG\_LEVEL\_WARNING or FMOD\_DEBUG\_LEVEL\_LOG
> - \_location is just a string used to identify where you are in your code, often I used the function name for this.
> - \_format is a printf format string, and the following var\_args are the printf parameters
> 
> Hope that helps.

Thanks, just what I was looking for. I’m surprised VS didn’t find that method when I searched through the API source. Thanks again.
