WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works, because angular-logger will use two arguments for the prefix, which can be referenced by index.
123
+
This works because angular-logger will use two arguments context and timestamp for the prefix, which can be referenced by index.
124
124
125
125
<aname='datetime-stamp-patterns'/>
126
126
#### Datetime stamp patterns
127
127
128
-
If you have included _moment.js_ in your webapp, you can start using datetime stamp patterns with angular-logger. The default pattern is `dddd h:mm:ss a`, which translates to _Sunday 12:55:07 am_. You customize the pattern as follows:
128
+
If you have included _moment.js_ in your webapp, you can start using datetime stamp patterns with angular-logger. The default pattern is `LLL`, which translates to a localized string that matches the current user's Locale. You customize the pattern as follows:
129
129
130
130
```javascript
131
131
app.config(function (logEnhancerProvider) {
@@ -138,7 +138,7 @@ app.run(function($log) {
138
138
// became: Sunday::[app]>Hello World
139
139
```
140
140
141
-
This way you can switch to a 24h format this way as well, for example, or use your locale-specific format.
141
+
A pattern like `try dddd h:mm:ss a` would translate to something like "Sunday 12:55:07 am". You can easily switch to a 24h format as well, using these patterns.
142
142
143
143
* For all options, see [moment.js](http://momentjs.com/docs/#/displaying/)
Using logging levels, we can manage output on several levels. Contexts can be named using dot '.' notation, where the names before dots are intepreted as groups or packages.
188
188
189
-
For example for `'a.b'` and `a.c` we can define a general log level for `a` and have a different log level for only 'a.c'.
189
+
For example for `a.b` and `a.c` we can define a general log level for `a` and have a different log level for only `a.c`.
190
190
191
191
The following logging functions (left side) are available:
0 commit comments