# Unable to set application-wide LogManager loglevel

**URL:** <https://discourse.aurelia.io/t/unable-to-set-application-wide-logmanager-loglevel/1452>\
**Category:** Help Requests\
**Created:** [July 19, 2018, 9:37am UTC](https://discourse.aurelia.io/t/unable-to-set-application-wide-logmanager-loglevel/1452 "2018-07-19T09:37:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyttike](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/kyttike/32/1398_2.png) [@kyttike](https://discourse.aurelia.io/u/kyttike)\
**Post date:** [July 19, 2018, 9:37am UTC](https://discourse.aurelia.io/t/unable-to-set-application-wide-logmanager-loglevel/1452/1 "2018-07-19T09:37:38Z")

</div>

Hi,

I am currently implementing logging for the web application I am working on and the current setup that I have is the following:

I’ve created 2 LogAppenders, one for console and one for logging to server and in main.ts I was planning on setting the logLevel with LogManager.setLevel depending on the environment that the application is running on (production, staging and local). Unfortunately when I set the Logmanager logging level in main.ts in the configure function, some parts of the application take the new loglevel into account and some don’t and I am unable to determine the cause of this.

In addition to the former, I didn’t really find any good examples to teach me, so I would also like to know, should the logger that I get from LogManager.getLogger(‘loggernamewhatever’) be defined below the imports in a file or in the constructors of classes that use logging? For example I have a helper class of models and right now I have the logger definition below imports, one for the entire file (file contains several classes) and logging seems to work without issues.

In another example I have 2 functions in one class, in one the logging works and in the other function it doesn’t. It seems to me like I am doing something terribly wrong 😃

Any advice or examples of how you have setup logging on your applications would be very appreciated!

PS. I really like working with Aurelia

---

<div class="post-metadata">

**Author:** ![ajoslin103](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/ajoslin103/32/281_2.png) [@ajoslin103](https://discourse.aurelia.io/u/ajoslin103)\
**Post date:** [May 12, 2019, 4:45pm UTC](https://discourse.aurelia.io/t/unable-to-set-application-wide-logmanager-loglevel/1452/2 "2019-05-12T16:45:09Z")

</div>

Did you ever figure this out? If so could you share an example of how you log from your application?
