9

I am using oidc-client with angular 7, and I want to enable logging. The doc suggests that I can do the following

Oidc.Log.logger = console;

I have not been able to make this work as Oidc does not appear to be on the window object??

Douglas Woods
  • 824
  • 2
  • 9
  • 25

1 Answers1

13

Just add this to your code for javascript

Log.logger = console;
Log.level = Log.DEBUG;

and the correct import

import { Log } from 'oidc-client';

For typescript, add the following

import { Log } from 'oidc-client-ts';
Log.setLogger(console);
Log.setLevel(Log.DEBUG);
jfk
  • 4,335
  • 34
  • 27
user2341176
  • 181
  • 1
  • 8