# Guideline on verbose in module (design pattern?)

**URL:** <https://discourse.julialang.org/t/guideline-on-verbose-in-module-design-pattern/72659>\
**Category:** General Usage\
**Tags:** design-pattern\
**Created:** [December 6, 2021, 3:45pm UTC](https://discourse.julialang.org/t/guideline-on-verbose-in-module-design-pattern/72659 "2021-12-06T15:45:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Thomas](https://discourse.julialang.org/u/Thomas)\
**Post date:** [December 6, 2021, 3:45pm UTC](https://discourse.julialang.org/t/guideline-on-verbose-in-module-design-pattern/72659/1 "2021-12-06T15:45:39Z")

</div>

So far I use a kwarg verbose (0,1,2,inf) to allow diagnostic information during my computation:

```julia
verbose && println("message here")

```

A more systematic way to handle this is using the Logging module and `@info, @warn, @error, @debug`. How can I structure this in a context of my module?

```julia
module MyModule

using Logging
# my definitions

end

```

so that later when I call

```julia
using MyModule
execute_computation(data; verbose=1)

```

I can have my desired level of logging. (Not sure if this is the standard way to do this kind of things in Julia.)
