@@ -5,7 +5,7 @@ import {Level} from "./level";
5
5
* Logger options.
6
6
* See {@link Logger}.
7
7
*
8
- * level - How much detail you want to see in the logs, 1 being the less detailed, 5 being the most. Defaults to WARN.
8
+ * level - How much detail you want to see in the logs, 0 being off, 1 being the less detailed, 5 being the most. Defaults to WARN.
9
9
* global - Whether you want the created logger object to be exposed in the global scope. Defaults to true.
10
10
* globalAs - The window's property name that will hold the logger object created. Defaults to 'logger'.
11
11
* store - Whether you want the level config to be saved in the local storage so it doesn't get lost when you refresh. Defaults to false.
@@ -59,7 +59,8 @@ export class Logger {
59
59
60
60
}
61
61
62
- private _loadLevel = ( ) : Level => localStorage . getItem ( this . _storeAs ) ;
62
+ private _loadLevel = ( ) : Level => Level [ localStorage . getItem ( this . _storeAs ) as string ] ;
63
+
63
64
private _storeLevel ( level : Level ) { localStorage [ this . _storeAs ] = level ; }
64
65
65
66
error ( message ?: any , ...optionalParams : any [ ] ) {
0 commit comments