I would suggest changing the maximum level based on whether or not you're
compiling for production instead of AOT vs. JIT.

The Angular CLI already sets you up with a production and development
environment.

Here is a good example that explains much:
http://tattoocoder.com/angular-cli-using-the-environment-option/

When you bootstrap your logger, you can inject the parameter from the
environment object which specifies the maximum logging level. If your
application was running in a production build, that level would be "warn"
while running in development, regardless of whether it was AOT or JIT,
would set the level to "debug".

-Luke

On Fri, Nov 17, 2017 at 5:37 PM Arnaud Deman <arnaud.de...@sppapps.com>
wrote:

> Hi,
>
> Is it possible to determine if the application has been compile in AOT or
> JIT at runtime ?
>
> My aim is to parameter the logging module to set a different maximum
> level: debug for JIT and warn for AOT.
> The Logging module is used for the first time at the AppModule creation.
> Perhaps this could be done when bootstraping if I could set a parameter ?
>
> Thanks for any suggestion,
> Regards,
> Arnaud.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+unsubscr...@googlegroups.com.
> To post to this group, send email to angular@googlegroups.com.
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Lucas Lacroix
Computer Scientist
Advanced Technology Division, MEDITECH <http://ehr.meditech.com/>
781-774-2293

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to